Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > c27466c2a3fa3cf6008c3a485d00ce04 > files > 92

jetty5-manual-5.1.15-1.5.2mdv2010.0.noarch.rpm

SECTION: 900-Content
TITLE: JSP
QUESTION: How can I deploy JSPs?

Problems deploying and/or shipping webapplications that include JSPs include:<UL>
<LI>License restrictions on JDK (NB recently relaxed on javac).
<LI>Security issues of a compiler on a production platform.
<LI>Difficulties in setting portable classpaths for all platforms.
<LI>Lack of compile time testing.
</UL>

A common solution to these problems is to precompile the JSPs into servlets:<OL>
<LI>Use the org.apache.jasper.JspC class to generate servlets and web.xml segment.
<LI>Compile the generated servlets and place classes in WEB-INF/lib as a jar or in WEB-INF/classes.
<LI>Update WEB-INF/web.xml with the servlet mappings.
<LI>Jar the directory into a WAR file.
<LI>Deploy the WAR file normally.
</OL>