@JavaOne[20050626]

I was the lucky employee sent to this year’s JAVAOne. Today is JAVA University, and my course is the Web Component Development with Servlets and JSP.

So far, we’re covering the basics of the HTTP request and response model. Nothing interesting yet, and even the moderator is blasting through this, which I am thankful for; nothing like false enthusiasm to put you off a lecture and make you miss out important info.

Okay, now some interesting info. Starting with 1.4 of J2EE, servlets are no longer cached. They are created anew each time. My guess is that they are giving in to all those bad developers that use member variables inappropriately in servlets. Forgetting to clear them out between requests, leaving data from one use into another.

Another good point made; SERVLETS are not really meant for HTML. The entire model was designed to handle different protocols. HttpServlet just provides support for HTTP. So ina servlet, ALWAYS set the content type before writing out.

By the way, I still know all this, I just passing it on. New motif and all, as I said yesterday.

Bit of a booboo in progress. The slide presentation does not match the printed copy supplied to us students. Though in either case, meh. Nothing new.

I am looking over the course itenary for another course, Applications for J2EE. It is given as Intermediate, while the course I am in is advanced, and yet the J2EE course covers a larger scope. I am getting disappointed here.

Okay, new change. The web.xml structure seems to be looser in 2.4 of the servlet spec. Servlet definitions and servlet mappings can alternate. I think its a pretty good change: the mappings of a servlet can be placed right next to its definition, so you don’t have to far to go to see what paths it handles, so good for large apps with lots of servlets.