## How can I deploy JSPs?

Problems deploying and/or shipping webapplications that include JSPs include:

- License restrictions on JDK (NB recently relaxed on javac).
- Security issues of a compiler on a production platform.
- Difficulties in setting portable classpaths for all platforms.
- Lack of compile time testing.

A common solution to these problems is to precompile the JSPs into servlets:

1. Use the org.apache.jasper.JspC class to generate servlets and web.xml segment.
2. Compile the generated servlets and place classes in WEB-INF/lib as a jar or in WEB-INF/classes.
3. Update WEB-INF/web.xml with the servlet mappings.
4. Jar the directory into a WAR file.
5. Deploy the WAR file normally.

JettyFaq