JSP.3.4 Precompilation


A JSP page that is using the HTTP protocol will receive HTTP requests . JSP 1.1 compliant containers must support a simple precompilation protocol , as well as some basic reserved parameter names . Note that the precompilation protocol should not be confused with the notion of compiling a JSP page into a Servlet class (Appendix JSP.C).

JSP.3.4.1 Request Parameter Names

All request parameter names that start with the prefix " jsp " are reserved by the JSP specification and should not be used by any user or implementation except as indicated by the specification.

All JSP pages should ignore (not depend on) any parameter that starts with " jsp_ ."

JSP.3.4.2 Precompilation Protocol

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 value "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 hint to the JSP container to precompile the JSP page into its JSP page implementation class. The hint is conveyed by giving the parameter the value "true" or no value, but note that the request can just be ignored in all cases.

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 be delivered to the page with no changes.

  6. ?jsp_precompile="foo"

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



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net