As this book was being written, a lot of work was being done on other tag libraries and changes were being made to the way JSP fundamentally works. The Struts tag libraries are really just one of a number of ongoing efforts, although they are among the best developed and are currently in widespread use. The Struts tag libraries are
However, it's important that you keep your eye on a number of other efforts. The most visible of these are based on work currently being done to extend JSP itself by including in it a number of standard tag libraries. These efforts are referred to as the Java standard tag libraries or JSTL (sometimes referred to as the JSP tag libraries or JSPTL ). The JSTL specification is covered by JSR-52 (Java Specification Request 52) and can be reviewed on the site of the Java Community Process (http://www.jcp.org/jsr/detail/52.jsp). JSTL itself is a moving target right now, but it will be adopted rapidly because of the significant value it adds by speeding the development and maintenance of your code. Here's a very high-level description of JSTL features:
There is some overlap between Struts and JSTL. Over time, the two will likely come closer together and some Struts tags probably will be deprecated as JSTL matures and is more widely supported. It is also very likely that Struts will influence future directions of JSTL to some extent. Many of the people involved in developing JSTL specifications are also involved in the Struts or other Apache/Jakarta projects. In summary, if your servlet container supports JSP 1.2 and JSTL, it's possible that some functionality for which you would otherwise require Struts might be available directly within the JSTL provided by your container. Whether or not you use Struts or JSTL will depend on your application, your expected migration path , and the timing of your project. The trade-off you'll have to make will be based on your desire for Java standards-compliance versus your desire to leverage Struts and its MVC architecture and tag library. Until JSP 2.0 becomes final and widely supported, I recommend using Struts where appropriate. Doing so should enhance portability while allowing JSTL to mature. Note For more information on the JSP standard tag library, read Sams Publishing's JSTL: JSP Standard Tag Library Kick Start by Jeff Heaton (ISBN: 0672324505). |