The Source for Java Technology Collaboration
User: Password:



Greg Murray's Blog

February 2006 Archives


Servlets Updated

Posted by gmurray71 on February 27, 2006 at 11:55 AM | Permalink | Comments (3)

Servlets sit at bottom end of the API stack for web developers using Java technologies. If you have used JSP, JSF, Struts, Web Work, Velocity, or any of the other frameworks out there you have more than likely used the Servlet API.

What do I like about the Servlet API? As a developer I like being as close to possible to HTTP as possible and Servlets lets me do that well. The Servlet API has adapted to fit the needs of scripting languages by being the base for JSP, re-usable component models such as JSF, frameworks like Struts, and Portlets. Servlets are even good for providing the server side processing for AJAX clients.

So what big changes were made in Servlet 2.5?
  • ServletContext.getContextPath() - Ever wonder what the context root was for your web application? This API is a long need addition.
  • Annotations - Added annotations for Java persistence, web service, declaring roles, run as, and EJBs. We did not add annotations for decarling servlets, filters, and listeners in this release though this will be a topic of discussion in the next servlet release.
  • Resource Injection - Resource injection is a way of injecting references of container managed resources such as data sources, environment entries, or web services into container managed components such as servlets, filters and listeners. Support for resource injection was added for Java Enterprise Edition containers.
  • web.xml Changes- Removed the need to have a web.xml in web applications without servlets, filters or listeners. Some conveniences for declaring components in the web.xml were added.

Jason Hunter, a long time member of the Servlet EG, has detailed the changes in the article New features added to Servlet 2.5 on Java World.

Download the updated Servlet 2.5 specification from here.

If you want to try out the Servlet 2.5 features today the Glassfish container provided by Sun just released a beta containing support for the new changes.

If you would like to see some of the things we are thinking about for the next servlet release, or if you would like to propose an addition please see my blog entry titled Got Servlets.



Happy 1st Birthday AJAX!

Posted by gmurray71 on February 17, 2006 at 07:00 PM | Permalink | Comments (3)

A year ago I swore I would never use the term AJAX (that lasted about 3 days) as it brought to mind cleaning my sink. A year later I have to say AJAX has made the world a better place and looks to make an even brighter future.

Where has AJAX come in its first year?

  • AJAX is almost easy enough for a 1 year old - When AJAX emerged there was a lot of FUD comparing AJAX to rocket science. At Sun have shown the any Java developer can easily use AJAX, whether it be from a simple web page attached to a Servlet as described in this tech tip or a JSF component in a tool such as Creator that does all the heavy lifting.
  • Everybody loves AJAX - While many companies would not touch a 1 year old technology with a 10 foot cattle prod, AJAX is different. Like any cute baby everyone wants to embrace AJAX. Over the past year many companies have deployed AJAX enabled applications and services. Others like Sun are enabling there tools and technologies.
  • AJAX is making lots of friends - Like any active 1 year old AJAX is making many friends. AJAX does not favor any platform or technology. It gets along with everyone. As I speak with developer from all walks of life (Java, .Net, RoR, and PHP) I can speak the same language though to a non-tech savvy passer by this may appear to be a 1 year old's gibberish.
  • AJAX learned to stand on its own - Not bad for a 1 year old! During the first year of existence many frameworks have begun to support AJAX. New client and server frameworks have emerged and every day something new appears.
  • AJAX is still growing - Like any 1 year old AJAX is growing up fast. New ideas and techniques are being developed and refined on a daily basis. Maybe AJAX will learn to talk in something other than XML or JSON during it's second year?

While much more could be said about this 1 year old I'll keep this short. We should all take a moment to reflect where AJAX have been in the last year and where it's going in the year to come. Happy Birthday AJAX!





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds