Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 9. JSP Best Practices > Deployment - Pg. 223

element in the JSP source file. A JSP 1.2 container is not required to support the ID mechanism, but many do, so this greatly enhances the error-reporting capabilities compared to the old TagExtraInfo mechanism. In the next version of the JSP specifi- cation, support for ID mapping will be a mandatory container requirement. Deployment JSP pages are typically deployed as is in the public document structure of a web application. The container converts each JSP file to a Java class file the first time it's requested, or possibly as part of the web application deployment process. Deploying the source files is not the only option, though. Consider Precompilation An alternative to deploying JSP pages directly is to precompile them into the corre- sponding JSP page implementation classes and deploy only the class files. The main advantage is that the container invokes the class file immediately instead of going through the JSP container and checking if the source file has changed, resulting in slightly better performance. If you deliver applications to third parties, the fact that the JSP pages cannot be modified can be an advantage, but it can also be a disadvan- tage because the customer might want to adjust the look and feel of the application. The class files for the JSP pages can be packaged in a JAR file and dropped in the