Java

New JSP tag library for Google queries

The open source Google Tag Library is a set of custom Java Server Pages tags that make it easy to add Google searches, cached pages, and spelling suggestions to a Web application. The tag library, which was created by Erik Thauvin, Matt Croydon, Diego Doval, and Arjun Ram, uses Google's Web services interface and require a free license key from Google that permits 1,000 automated queries per day. ... (read more)

Speed up Java: Use the server VM

The author of the Java is Faster than C++ and C++ Sucks Unbiased Benchmark offers a tip for speed-conscious Java programmers -- always run classes with the server version of the virtual machine: No one should ever run the client JVM when given the choice. ... Every form of Sun's Java runtime comes with both the "client VM" and the "server VM." Unfortunately, Java applications and applets run by default in the client VM. The Server VM is much faster than the Client VM, but it has the downside of ... (read more)

Java inventor tries for a jackpot

A profile of Charles Simonyi in Technology Review describes Java inventor James Gosling as a recent convert to modeling: Recognizing that the software industry constantly reuses old programs, Gosling proposes finding a way to plug existing code into a modeling tool that will represent it graphically, rather than requiring programmers to pore over millions of lines of text. ... Code-named Jackpot, the project is still small, well outside Sun's product development process. In an Artima interview ... (read more)

Handling MD5-encoded passwords in Java

On his Arena Red weblog, Trygve Isaacson offers MD5Password, a Java class that offers a simple interface for using MD5-encoded passwords: Typically, you just want to either check that a clear text password you've been given hashes to match a stored value, or you want to hash that string to get a value you can store. So that's just two very simple function APIs ... ... (read more)

Sun offers icon graphic collection

Java programmers can find several dozen nice-looking icons for use in graphical user interfaces in the Java Look and Feel Graphics Repository, part of Sun's Java site. The graphics are intended to promote Java's standard look and feel, but they also can be adopted for other purposes. I'm using them in an RSS newsreader demo project for the next edition of Sams Teach Yourself Java 2 in 21 Days. ... (read more)

Ayers outlines his beefs with OPML

Danny Ayers offers an "anything but OPML" rant against the world's most popular outline markup language. He writes: It's worth noting that you can express hierarchies and everything else I've seen suggested for OPML (text outlines, links, images etc) in (X)HTML. I suspect there are more HTML readers/writers than OPML ones! Unless XHTML can be used to express the expansion state of specific items, I don't see how it could be used as an alternative to OPML for outlines. OPML's an odd bird, but ... (read more)

Creating MD5 hashed passwords in Java

I found a much-needed Java programming tip in a LiveJournal XML-RPC client programming discussion this afternoon: How to create an MD5-hashed password from a string. Radio UserLand only presents hashed passwords when publishing via XML-RPC, storing the plain text version in the object database. The following class method can be used to create a hash from a string: public static String hashPassword(String password) { String hashword = null; try { MessageDigest md5 = ... (read more)

Commercial server supports four weblog APIs

While doing research on Java implementations of the XMLStorageSystem API, the backbone of Radio UserLand web hosting, I found something unusual: Full support for the API in a commercial server product. As shown in the documentation, the OpenLink Virtuoso "universal server" supports the XML Storage System, MetaWeblog, Blogger, and Moveable Type APIs, which enables it to host weblogs created with Radio and other weblogging tools. This is my first exposure to Virtuoso, but in an article for ... (read more)

Naked programmer ponders values

In an e-mail, Garth Patil writes: I just read your Linux Magazine article on the Naked Objects framework. ... I've been dinking around in their source, and I can't figure out why all of the Java primitive data types need to be duplicated in the framework. Do you know of an example of why these duplicates are necessary? For example, looking through the source, I can't figure out what the advantage/necessity of using TextString over String. Anyway, I'm probably missing something huge, and I was ... (read more)

Singing the praises of JSP taglibs

Joshua Marinacci has become a convert to Struts and custom Java Server Pages tag libraries, using them to make it easier for his HTML-coding sister to maintain a weblog implemented with JSP: .... now I've discovered custom taglibs. These are brilliant! From my sister's point of view there are now a few magic tags she can use to do something. My scripts are no longer code, just extensions to HTML, as if there was a new version of Netscape with support for a magic <blog> tag. These tag ... (read more)