With JSP 2.0 going final, we've been running quite a few articles on this topic as part of our November feature. We continue with an article that Sue Spielman has written pulling highlights from her book.
In part two of her feature Practical JSTL, Sue Spielman takes a look at "the available standard actions contained within the JSTL in the XML, I18N, and SQL libraries." She takes you through "the XML core actions [which] provide the basic functionality to parse and access XML data, [and] the XML flow control actions are used to do conditional processing and iterations." She also covers "the internationalization and formatting actions provided in the JSTL are a comprehensive set of actions that can be used to minimize the headaches of having to internationalize your application. These actions come under the functionality of the I18N umbrella."
Sue asks " "Do I really want to be able to perform SQL actions such as queries, updates, and transactions from my JSP? Isn't that business logic that belongs in the model?" Her answer is that you don't want to handle your model information in the view but in the business logic. Although you don't want to perform SQL from your JSPs, Sue found that the answer from the expert group was "The community has asked for it, the community has gotten it."
Even the webloggers are writing about JSTL. In Weblogs , Michael Nascimento Santos writes about Crazy JSTL: when an empty Collection is not empty. He asks if you've ever had code that "looked impossible to be incorrect actually was incorrect?" Yes, Michael of course. He points, in this case, to articles about JSTL that lead you to believe something that isn't the case.
He writes, "most articles and presentations about JSTL say empty works for Collections. Just to mention a few examples, articles published at OnJava, IBM DeveloperWorks and even java.sun.com wrongly state it. But why can it simply return true although the spec doesn't mention it? Well, because it cannot be considered an omission. The spec says that otherwise, it must return false. Otherwise sadly covers Sets and any other Collections implementation that does not descend from a List. Sad, very sad indeed."
In Also in Java Today you'll see how to replace or add HttpUnit to Junit when you Build a Java Web App using HttpUnit and Test-Driven Methodology. In this devX tutorial, Wellie Chao writes that HttpUnit " enables you to write tests that simulate a user accessing a Web-based application via a browser. It has many of the functions you expect a browser to have: cookie management for sessions, parsing of HTML content, form submittal via the GET and POST methods, authentication, and other features. You can check for certain content on the page, link by link and form by form, allowing you to verify that the application returns the proper results."
We link to Bruce Tate's article on Simpler Java in the Server Side. To quote from our front page blurb, Tate looks at some of the principles being employed recently. On the one hand he notes Hibernate's strategies of "Do one thing and do it well", "Strive for simplicity", and "Pick your battles". On the other he looks at lightweight containers that "Strive for transparency", "Allow for extension", and "Keep a small footprint".
Today in Projects and Communities we point to this week's project spotlight. The aTrack project is "an open source bug tracking application that demonstrates use of Aspect-Oriented Programming (AOP) with AspectJ." From the JavaJar we've pulled the epsgraphics2d project. It allows you to create "high quality EPS graphics for use in documents and papers, and can be used just like a standard Graphics2D object."
In today's java.net News Headlines :
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
news submission form.
All submissions go through an editorial review by news director Steve
Mallet before being posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
Current and upcoming Java Events:
- December 3-4 JavaPolis 2003 Belgium
- December 3-4 SunNetwork EMEA
- December 10-11 Borland Conference France
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
This blog is delivered weekdays as the
href="http://today.java.net/pub/q/java_today_rss?x-ver=1.0">Java Today RSS
feed. Once this page is no longer featured as the front page of href="http://www.java.net"> java.net it will be archived at href="http://today.java.net/today/archive/index_11282003.html">
http://today.java.net/today/archive/index_11282003.html. You can
access other past issues in the href="http://today.java.net/today/archive/">java.net Archive.