Servlets.com Home
March 29, 2002
XPath Class in JDOM

JDOM now includes build-in XPath support with the org.jdom.xpath.XPath class, written by Laurent Bihanic and supported by the Jaxen back-end by default. If you're interested in using XPath from JDOM, get the latest code from CVS and check it out. We didn't put the class in Beta8 because it's subject to significant change.

Posted by Jason Hunter at 08:42 PM
JDOM Beta8 Release

Today we released JDOM 1.0 Beta8. The feature set is the same as RC1 announced two weeks ago, but we fixed the minor bugs people found in RC1. Look at the CHANGES.txt file for what's new since Beta7, and look at TODO.txt for what remains to be done.

http://www.jdom.org/downloads/index.html

Posted by Jason Hunter at 08:33 PM
March 23, 2002
Article Comparing Java and .NET Bytecodes

Found a research paper comparing Java and .NET bytecodes, titled "Stacking them up: A Comparison of Virtual Machines". Most interesting conclusion: The .NET execution engine wasn't designed to support interpretation, so it's not well suited for small footprint devices.

Posted by Jason Hunter at 07:41 PM
March 22, 2002
The Day Java Opened Up?

Years from now, today may -- just possibly -- be known as the day Java opened up.

As some of you may know, I'm the Apache Software Foundation representative to the Java Community Process (JCP). What that means is that over the past year and a half I've been engaged in an ongoing effort to open up the JCP and fix several of the crazy restrictions stopping open source implementations of Java standards (JSRs). It's true Apache hosts many projects that implement JSRs (Tomcat for Servlets/JSPs, Xerces and Crimson for JAXP, Axis for JAX-RPC, etc) and often with Sun's support. But the legal terms have always been shades of gray and, to be honest, closer to black than white.

Back in January and early February, I wrote and Apache published a JSPA Position Paper enumerating four points seen as critical to Apache's support and continued participation in the Java Community Process.


  • The right to freely implement specifications in open source
  • The right for specification leads to release reference implementations and test kits in open source
  • The right for specifications to be created more publicly
  • The right to free access to test kits by open source, non-profit, and academic groups

Apache set JavaOne as the deadline for the issues to be addressed. This was further reinforced by the passing of an Apache board resolution which mandated that Apache would stop its implementations of JSRs where open source implementations were not clearly allowed (a special Apache waiver would not suffice, it was all open source groups or jettison the project).

Over the last several weeks, my time has been spent in discussions with Sun about how to address Apache's requirements, and also with Apache members in an attempt to fully specify our collective requirements. Apache operates like a democracy and although everyone agreed change had to happen, consensus had to be built regarding the style and extent of that change.

All this time both Apache and Sun were unsure if there was any middle ground where the two could meet. I would have laid even odds.

This week, the last week before JavaOne, discussions reached a fevered pitch going all hours of the day. It's an odd experience being awakened in the early morning by a call from a Sun Vice President. It's even more odd when you're not surprised...

Two nights ago on Wednesday came the show-down. Members from Apache and Sun teleconferenced together to discuss a Sun proposal for change. Everyone seemed nervous. The roles were set. Apache had to be on solid legal ground to continue supporting the JCP. Sun had to find ways to legally allow open source Java implementations without abandoning compatibility.

When the call concluded two hours later, I remember one Apache person asked another: "Am I crazy or did we get what we needed?" I'm told Sun people asked each other the same thing: "Are we crazy or did they seem satisfied?" Middle ground appeared to have been found. Yet everyone was -- and still is -- waiting for the other shoe to drop. Some of these issues had been fought about for years!

This noon the action became public when Sun posted their letter of intent, perhaps more appropriately called a pledge, to the JCP.org website. The news item doesn't receive high billing, but that belies its importance and the work that went on behind it for both groups.

The letter of intent says Sun will do the following:


  • For Sun-led specifications finalized from here forward (including revisions to existing specifications) the license terms will allow independent implemenations under open source licenses.
  • The Test Compatibility Kit (TCK) binaries for these specifications will be made available at no cost to qualified open source, non-profit, and academic groups.
  • A three-member board, including a representative from the Apache Software Foundation, will assure an impartial qualification process.
  • Sun will provide substantial support to aid these qualified groups in the use and execution of the TCKs.

In addition, Sun has proposed changes to the legal agreement signed when joining the JCP, known as the JSPA, and has sent these changes for review to the Sun-led committee working on the revision. The goal is for the JSPA, when it's finalized and signed by members, to legally require this level of openness across all JSRs. Furthermore, the JSPA will explictly allow open source reference implementations and test compatability kits, as well as more public involvement in the development of JSRs where it makes sense.

The terms looks good, albeit non-binding. So don't for a second think this is over. Apache will be carefully watching if Sun honors its word, and if Sun doesn't, there won't be another large behind the scenes fight -- Apache will just bug out knowing it had given things its best effort.

For myself, step one will be to see what Sun says of this at JavaOne. A Friday posting to a second-level page on jcp.org is about the quietest official release Sun could give. If Sun was serious, you'd think they'd want to say so a little more publicly. JavaOne next week should be interesting. What's accomplished within the 90 day window should be even more interesting. Stay tuned.

Posted by Jason Hunter at 07:37 PM
New Weblog Mailing Lists

Servlets.com has two new mailing lists for those interested in receiving notification when new Servlets.com weblog entries are added. The first list provides instant notification, the second provides once-a-week notification of all entries added over that week. I've been asked for this feature by a few people, so I'm hoping people find it useful. You can subscribe here.

FYI, I'm using some home-grown software to manage the mail generation. It can pull data from any RSS or Meerkat feed and -- driven from an XML configuration file -- will send announcements at specified time intervals to any address as these feeds update. Comment to this blog entry if you want to take a look. It's darn useful.

Also, as of today all Servlets.com lists are hosted by Mailman. I've used Mailman on jdom.org with great success, and I think Mailman is easier to manage than ezmlm.

Hope you enjoy the lists!

Posted by Jason Hunter at 03:59 AM
March 20, 2002
.NET in a Virtual Computer

To follow on to the previous entry about .NET system requirement, I do agree I can buy or build a PC desktop system for well under $1000. The big downside is that ties me to home, and some days I like to visit and work with other work-at-home friends at their place. (Any other work-at-home people do that?)

I'm thinking now about what Brian Jepson said and using either VMWare or Virtual PC to set up a virtual copy of Windows XP on top of my Windows 2000 laptop. It'll let me run an isolated copy of the OS so when .NET blops its DLL turds all over the place they don't affect my real system -- while at the same time I can bring one laptop everywhere and do my .NET work as needed! It's like dual booting without the pain of booting. Cost is $300 for VMWare or $200 for Virtual PC. Both have free trials, so we'll see how they work. If anyone else has tried these, especially for .NET development, I'd love to hear it.

Posted by Jason Hunter at 02:51 PM
March 19, 2002
Added Site Search Ability

To support the growing size of Servlets.com, I've added the ability to search for pages across the site. At the upper left of the standard nav bar you'll now see a simple but powerful Search box. Just enter your keyword(s), hit enter, and you're good! It's driven by Google's ultra-cool Site Search functionality.

You won't see it on blog pages like this one until I templatize the blogger. Go to the front page to try it out right now.

Posted by Jason Hunter at 01:43 PM
March 18, 2002
.NET System Requirements

Today I realized just how expensive it's going to be to get going with .NET, when I asked the company I'm contracting with what sort of system I need to use for development. The answer, "A 1 GHz or better Pentium with at least 256 Megs of RAM. Anything less and you'll be frustrated. You'll also want that to be a dedicated machine or at least a dedicated partition."

It's the last part that has me worried. A Microsoft shop is telling me to sacrifice a full machine to the .NET gods. I'm not sure exactly why yet (I'll let you know) but for now I plan to play it safe and trust them.

Taking stock of my computer inventory, I have lots of old machines: No use. I have my main machine, a nice 850 MHz laptop with 384 Megs. It was top-of-the-line 18 months ago. Sadly it's already borderline for real .NET development. I could use it anyway and suffer the slowness, but I don't want to dual boot between a development partition and a real partition day after day. I need another machine.

You can predict what logical step I'm going to take next! I should use this dinosaur laptop for the .NET development and score myself a shiny new laptop! One with a SWDVD/CDRW combo drive! One with Wi-Fi built right in! One that costs $3,000! No, no, no, I must resist. This 850 MHz is good enough for everything else I do, no need to spend the big cash right now. Plus it's supremely annoying to migrate machines.

Good logic dictates I should get a $1,000 desktop machine, nothing fancy. Yikes, then I'll only be able to develop at the home office, not on the road where I spend large chunks of my time, and I can't bill when I'm not developing.

So have I talked myself into the shiny new laptop yet?

Posted by Jason Hunter at 07:42 PM
Bug Page Addition: URLConnection

I just added a high-profile bug to the "Servlet Bugs You Need to Know About" list concerning URLConnection.getInputStream() in JDK 1.3. Seems the method does not return until the server completes the response and closes the socket connection, causing serious headaches for client-server applications. The bug list has the details and workarounds.

Posted by Jason Hunter at 05:07 PM
March 14, 2002
Schema Validation in JDOM

If you're interested in doing schema validation with JDOM, you'll want to check out the new FAQ entry I added today giving step-by-step instructions. It's easy code, but you have to know the right steps.

Thanks to Kevin Jones (author of this month's "XML Magazine" article) for writing the FAQ entry.

Posted by Jason Hunter at 10:05 PM
JDOM on Cover of "XML Magazine"

To my surprise, I see the cover of Fawcett's "XML Magazine" for March has JDOM on the cover, and inside an article by Kevin Jones showing how JDOM works.

JDOM's been around long enough it's funny there has to be yet another intro article, but this one's well written and up to date (at least for the moment!). Fawcett even has the article online.

Posted by Jason Hunter at 05:36 PM
March 12, 2002
Faster Mail Archive Listing

As the mail archive has grown (we're over 150,000 messages now) the front page archive listing has gotten slower, so I've changed the ViewLists servlet to cache the message counts for 24 hours. All hits after the first should be nearly instantaneous.

If you find other parts of the site slow, please comment below and I'll look at fixing them.

Posted by Jason Hunter at 06:42 PM
JavaOne Presentations (flame, part 2)

(Originally sent to jdom-interest March 8th. Reposted here to follow the previous entry.)

This is part two in my story about the crazy things they do to JavaOne presentations...

After the events of the last email, I bit the bullet and changed my slides to a format where they could be approved by the Training Alliance "Slide Nazis". If you recall, my major concern was trying to make the slides useful to someone *after* the show while keeping within their rule of having just a few lines per slide with 6 words per line. After a little thinking, I realized this was just a *whitespace problem*! If you're willing to add a couple slides and take what was a sentence and make it into two 6-word bullet points, you can have whatever content you want within any whitespace boundaries! Problem solved!

SlideOutputter slideOutputter = new SlideOutputter();
slideOutputter.setFormat("JavaOne");
slideOutputter.output(pdfResult, jdomTalk);

The next challenge came this morning: Legal Review. You'll never believe what they changed in the name of legal review!

First, the changed my title. What was the catchy "JDOM Makes XML Easy" is now something reminiscent of a scientific journal: "JSR-102 ('JDOM 1.0') Makes XML Easy". I can't imagine why this change was made during legal review. On the bright side, it's better than last year when they changed "JDOM" to "The Document Object Model for Java".

Second, they changed a quote I was using (remember I needed to add a quote to pass TTA review). Where the person really said, "Java and XML" it's been changed so they now say "Java technology and XML". Like anyone really says that. Isn't it risky legally to put words in someone's mouth -- adding something they didn't really say -- probably more risky than to let the world know they said the word Java without the word "technology" after it?

Third, on the page about myself I had a nice small picture of my book cover. It was removed! It's clear where it used to be because they left the big gap. What legal justification is there for removing a book cover promo? Maybe I'll bring a copy of my book and have someone hold it up at that spot in the slide.

To my slight surprise, those are the only changes they made. I guess that's because many of the slides are code, and lawyers don't like reading code any more than coders like reading legal documents. Makes me think of another possible hack. If you want to say something that would be censored, put it in a code comment! I bet that would sneak through. :-)

-jh-

Posted by Jason Hunter at 12:26 AM
JavaOne Presentations (flame)

(Originally sent to jdom-interest February 10th. Reposted here since I hear it's been forwarded around amongst other JavaOne speakers.)

I just have to vent, and this crowd seems like a fine place to vent about this particular thing.

I'm presenting a talk on JDOM at JavaOne this year, and Oh My God!, the slide submittal process is horrid. Absolutely draconian. Unlike *every other conference* I've spoken at (dozens), at JavaOne there are people who critique your slides on various Rules. These Rules definitely are smart guidelines but at JavaOne they are literally *Rules*. If you don't pass each and every rule down the line, they don't let you give your talk.

One sample rule:

You need a graphic on at least one out of every 6 pages. Need it or not, appropriate or not, you need a graphic. It's supposed to keep your audience awake. Well, I guess I have to come up with a graphic for the section where I compare JDOM with DOM. Any ideas? I wonder if a picture from Anna Kournikova's new calendar would do. It'll keep people awake.

Another rule: You should have no more than six words per bullet point. Wait, did I say "should"? I mean MUST as in the W3C spec meaning of the word. Anything longer than six words is.

That last one really bugs me. I personally find JavaOne slides 100% useless after the talk because of this rule. I've downloaded slides in years past from talks I couldn't attend. Here's what you get:

* JVM Performance In Process
* Garbage Collection In Real Time

Oh yeah, I'm really learning now! They say this rule is to keep the point size up so you can read the slides during the show, but seems to me:

* If you're at the show you're listening, not reading
* If you're not at the show, you can only read

(Notice the effective use of 9 word bullets there.)

So with big point sizes you can read my outline during the show, but after I'm done talking, all the points are lost.

I was proud and stood my moral ground and flaunted the rules -- I used graphics only when I needed graphics and I tried to actually *say something* with each bullet point. But no. The people reviewing the talks actually counted my words and my graphic densities. I failed. I'm told I need to revise now.

What's really ironic is last year the same basic slide outline was accepted. I was just unlucky enough this year to get the Presentation Nazi. I can almost hear him yell: "No presentation for you, one year!"

Maybe you're thinking I should obligingly bow to the Rules and be tricky and bring my own slides in on a laptop on the presentation day. No can do! They're on to that! You can't bring your own laptop to present. Every other conference I've spoken at lets you. Why not at JavaOne? They say it's to keep things simpler to setup, but really how simple is it for me to load JDOM examples on their machine versus my own?? Here's my theory: if anyone ever tries to make The Training Alliance Nazis (tm) look bad (you know, someone in a bad mood -- try to picture it), they'll know beforehand and have some leverage to encourage you to change your slides.

I agree these guidelines make sense in general, but can we give the speakers no credit? The best talks I've ever attended have slides that don't in any way follow the JavaOne Rules. And some of the worst talks I've ever attended have been at JavaOne. Maybe they're trying to raise up the quality of these poor talks by rigidly enforcing these rules. I think it's more likely they're creating poor talks by enforcing these rules.

Ah well. At least I can still say what I want on stage. Um, probably. I'll let you know if they actually let me speak live on stage or if it's a tape recording.

-jh-

P.S. Sun speakers suffer from this just as much as outside people, if not more. This is another reason why no one at Sun looks very happy the month before JavaOne.

Posted by Jason Hunter at 12:19 AM
March 11, 2002
Added ReportMill Tool

Added ReportMill to the Tools listing. It's a GUI page design tool with an ability for its pages to act as templates for servlets and be output as PDF or Flash. Slick. Thanks to Java Web Start I could run the demo by clicking on a link. Very slick.

Posted by Jason Hunter at 07:33 PM
JavaOne JDOM Get Together

Sounds like several people prominent on jdom-interest are going to be at JavaOne this year, many of whom I've never met and who have probably never met each other. We can't let this opportunity pass! There's no JDOM BOF officially, but I am giving a JDOM talk (time still unknown), and after the talk we could gather together and arrange something. I know Jools Enticknap and Joe Bowbeer will be there. Hopefully there'll be others. If you're someone who's well known on the list and you'll be there, add a comment below.

Posted by Jason Hunter at 06:08 PM
JDOM Beta8 Release Candidate 1

Today I built and made available JDOM Beta8 Release Candidate #1. The list of improvements over Beta7 (as recorded in CHANGES.txt) is astounding.

This isn't the formal Beta8 release. It's intended for people to upgrade against so they can identify any showstopper issues before the final release. If you're using JDOM, get the RC1 from jdom.org.

Posted by Jason Hunter at 05:42 PM
March 10, 2002
Thoughts on MovableType

In case you're curious what blogging software I'm using, it's called MovableType, and it's a free Perl/CGI package available at http://movabletype.org. Yes, I would have liked to have used a Java-based blogger, but I couldn't find any.

Thus far using MovableType (MT) has been a pleasure. Install was easy and they have a script that checks everything is configured correctly and tells you what to do if anything's amiss. Blog management is effortless, and the feature list is great. My favorite feature is the automatic RSS syndication so it's easy for third parties to read the meta-information about these blogs. Pull http://www.servlets.com/blog/index.xml and you'll get links to the latest.

MovableType "builds" a site upon demand, so the load on the server is minimal. The only reason you'll see a CGI operating on the server is if you comment on a post. MT also supports templating, so you can adjust the look and feel. I'll play with that feature later.

I'm left with only one problem maybe someone out there's already solved. When I transferred the MT data from the staging machine to the production machine, I could no longer login, and I had to recreate the configuration on the live box. The .db files were transferred successfully using scp. Why would they be tied to a machine?

Posted by Jason Hunter at 02:04 AM
New Feature: Blogging!

Today I added a new feature to Servlets.com: Web logging ('blogging). I always wanted Servlets.com to have a "What's New" feature for the little things I add everyday, but it's a serious pain in the wrist to change the front page and a secondary page for each entry, much less to manage archives. A weblog is just the ticket!

I'm also going to use this weblog to share some of the interesting things I hear and ponder about. Categories I've set up include Java, Open Source, XML, Web Services, and .NET.


Wait a second! Did he just say .NET?!

Yes, I'm taking a tour of the dark side. I have a new contract to help port a Java-based web application to .NET, and I'm looking forward to airlifting myself into an entirely foreign, possibly hostile land. I've maintained a work journal since I started writing "Java Servlet Programming" four years ago, and I've always found it tremendously useful as a knowledge repository. This time I'm going public with my journal. Starting from zero, you and I together will see what happens when a Java programmer tries to become a .NET programmer.

Posted by Jason Hunter at 01:47 AM