JSP Precompilation

More from the JSP Spec:

“A request to a JSP page that has a request parameter with name “jsp_precompile” is a precompilation request . The “jsp_precompile” parameter may have no value, or may have values “true” or “false”. In all cases, the request should not be delivered to the JSP page. The intention of the precompilation request is that of a suggestion to the JSP container to precompile the JSP page into its JSP page implementation class. The suggestion is conveyed by giving the parameter the value “true” or no value, but note that the request can be ignored.

For example:
1. ?jsp_precompile
2. ?jsp_precompile=”true”
3. ?jsp_precompile=”false”
4. ?foobar=”foobaz”&jsp_precompile=”true”
5. ?foobar=”foobaz”&jsp_precompile=”false”

1, 2 and 4 are legal; the request will not be delivered to the page. 3 and 5 are legal; the request will not be delivered to the page.

6. ?jsp_precompile=”foo”

This is illegal and will generate an HTTP error; 500 (Server error).”

So does anyone have utilities for automating this upon deployment of an application? Nice… apparently Ant has a task built in to do this very thing.

Leave a Reply

Your email address will not be published. Required fields are marked *