|I know that the JSP 1.2 specification is now final, and that Tomcat 4.0 implements the new specification. Is there anything special I need to do to run your JSP 1.1 example application from the first edition of the book with Tomcat 4.0?|
JSP 1.2 is backwards compatible with the JSP 1.1 specification, so any JSP 1.1 application should run unchanged with a JSP 1.2 compliant container. Besides Tomcat 4.0, other containers also implement the new Servlet 2.3 and JSP 1.2 specifications.You install Tomcat 4.0 pretty much the same way as described for Tomcat 3.2 in the book. The only difference is that you should set the CATALINA_HOME environment variable instead of the TOMCAT_HOME variable. This name change refects the fact that the servlet container part is actually called Catalina, while the JSP part is called Jasper: combined they are called Tomcat.You start and shut down Tomcat 4.0 just as Tomcat 3.2, using the startup and shutdown scripts in the bin directory.
Tomcat 4.0 uses a slightly different directory structure than Tomcat 3.2, but the web application directory is still named webapps. This means that you can install the example application exactly as described in the book: copy the ora directory from the jspbook.zip file to webapps/ora. That’s all there’s to it.
If you like to use the example custom tag library in another application, you can take advantage of the new auto-discover feature for tag libraries introduced in JSP 1.2. This way you don’t have to mess around with tag library declarations in the web.xml file. See my JSP 1.2 article for details.
That said, I recommend that you migrate to the JSP Standard Tag Library (JSTL) instead of using the custom tag library from the first edition of the book. The second edition of the book covers all you need to know to use the JSTL actions.