codaland
Saturday, January 18, 2003
       
XML 2 String
xml-to-string.xsl serializes a node-set into an XPath string whose value consists of (escaped) XML markup. This can be very useful when you need to display an XML document in the context of an HTML web page. Alternatively, you may need to upload XML to a server from a browser in, say, a hidden form field. That XML needs to be escaped obviously. Instead of using a funky extension function, use xml-to-string.xsl, in order to ensure full interoperability of your XSLT stylesheets.

The stylesheet contains a named template called "xml-to-string" that takes a "node-set" parameter which defaults to the current node. There are a number of other global parameters that can be overridden in an importing stylesheet. Browse through the listings below to see it in action. Be sure to visit xml-to-string2.html, which shows the result of a more sophisticated use of this utility.
#


       
WebSniffer

View HTTP Headers and Source from a web page. Only does GET. #




Friday, January 17, 2003
       
Smack
Smack is an Open Source library for communicating with XMPP (Jabber) servers to perform instant messaging and chat.

Key Advantages:

* Extremely simple to use, yet powerful API. Sending a text message to a user can be accomplished in three lines of code:

XMPPConnection connection = new XMPPConnection("jabber.org");
connection.login("mtucker", "password");
connection.createChat("jsmith@jivesoftware.com").sendMessage("Howdy!");

* Doesn't force you to code at the packet level, as other libraries do. Smack provides intelligent higher level constructs such as the Chat and GroupChat classes, which let you program more efficiently.
* Does not require that you're familiar with the XMPP XML format, or even that you're familiar with XML.
* Provides easy machine to machine communication. Smack lets you set any number of properties on each message, including properties that are Java objects.
* Open Source under the Apache License, which means you can incorporate Smack into your commercial or non-commercial applications.


Very nice. #


       
Creating a Web Application with Ant and Tomcat 4
I have decided to use Tomcat 4 Servlet/JSP Container technologies to implement a Web application. This still leaves many options, and choosing between the various available technologies is not easy. For this article, I have chosen to keep it simple and use Java Server Pages (JSPs) in combination with Java classes.Ant is used to create the Web application's Web Archive (WAR) file, and to install and deploy the WAR file into Tomcat, configuring the javax.sql.DataSource relational database interface in the process. All of these packages are available on the Internet at no cost.
#


       
Never Mind the Namespaces: An XSLT RSS Client
RSS is an XML-based format for summarizing and providing links to news stories. If you collect RSS feed URIs from your favorite news sites, you can easily build dynamic, customized collections of news stories. In a recent XML.com article Mark Pilgrim explained the history and formats used for RSS. He also showed a simple Python program that can read RSS files conforming to the three RSS formats still in popular use: 0.91, 1.0, and 2.0. While reading Mark's article I couldn't help but think that it would be really easy to do in XSLT.
#




Thursday, January 16, 2003
       
This is just a test. Only a test. #



Tuesday, January 14, 2003
       
HTTPClient: Java HTTPClient supports client-side digest auth
Using the HTTPClient should be quite simple. First add the import statement import HTTPClient.*; to your file(s). Next you create an instance of HTTPConnection (you'll need one for every server you wish to talk to). Requests can then be sent using one of the methods Head(), Get(), Post(), etc in HTTPConnection. These methods all return an instance of HTTPResponse which has methods for accessing the response headers (getHeader(), getHeaderAsInt(), etc), various response info (getStatusCode(), getReasonLine(), etc), the response data (getData(), getText(), and getInputStream()) and any trailers that might have been sent (getTrailer(), getTrailerAsInt(), etc). Following are some examples to get started.
#


       
Web Services Security - HTTP Digest Authentication without Active Directory
Digest authentication has been around for quite some time, but has stayed in obscurity to some extent. This is probably due to the fact that a limited number of servers support it, and a limited number of clients support it as well. IIS also requires certain Active Directory settings to be made in order to use the built-in implementation. However, it overcomes many of the weaknesses of Basic authentication. In particular, it does not require an encrypted channel for communications, because passwords are not sent in clear text (as they are in Basic). The benefits definitely outweigh the costs, as evidenced by Microsoft choosing to use Digest for their MapPoint.NET service.


#




Monday, January 13, 2003
       
Java HTTP Basic and Digest Authentication Client / Server
The HTTP archive makes HTTP digest authentication available to both clients and servers (see RFC 2617 for more information on digest authentication). The tar file includes: class files jar, source jar, documentation jar, and some examples.


Yes! Yes! Yes! #


       
Java Excel API - A Java API to read, write and modify Excel spreadsheets
This is the home page of Java Excel API - open source Java API which allows Java developers to read Excel spreadsheets and to generate Excel spreadsheets dynamically. In addition, it contains a mechanism which allows java applications to read in a spreadsheet, modify some cells and write out the new spreadsheet.

This API allows non Windows operating systems to run pure Java applications which can both process and deliver Excel spreadsheets. Because it is Java, this API may be invoked from within a servlet, thus giving access to Excel functionality over internet and intranet web applications.
#




Sunday, January 12, 2003
       
XML Output JSP Actions Code Generator: JSP Tag Library for Generating XML Dynamically
Devsphere XML JSP Tag Library (XJTL) comes with a code builder that takes a sample XML document and generates a JSP page that outputs the sample XML content. You may edit the generated JSP in order to make it more general so that it can output XML documents that are similar to the given XML sample.

#




blogroll:

winer
slashdot
javalobby
the server side
developerWorks
news.com
dotnet247
dotnet junkies
gotdotnet
sam gentile
sam ruby
paul prescod
.net guy
0xdecafbad
jon udell
john robb
dj's
rebelutionary
blogging roller
desktop fishbowl
servlets.com
cafe au lait
be blogging
kevin burton
paradox1x
james strachan
the truth is out there
brett morgan
blogging roller #2
joe's jelly
psquad's corner
zopen-x
rickard oberg
the saturn times
russel beattie
gerhard froelich
pete drayton
clemens vaster
weakliem
reinacker
drew
wagner
ingo rammer
ken rawlings
system.error.emit
tomas
simon fell
bit working
justin rudd
chris sells
john lam
jim murphy
brian jepson
john burkhardt
matt pope
better living through software
windley
caetano
kulchenko
loosely coupled
understanding software engineering
rest lst,rdf-interest lst,tag lst ucapi lst
archives:


A man, his puppy, and a double barreled shotgun.

Powered by Blogger