Reisman Jason wrote:
>
> Hi,
> Does anyone know how to directly call a JSP engine to compile/generate
> a JSP page? That is, I would like to call a method which takes the
> url or filename of a JSP page, compiles it into a servlet (if it
> hasn't done so already), and finally returns the output of the page.
>
> For example, any methods similar to the following would be optimal:
> public String generateJSP(String filename);
> public void generateJSP(HttpServletRequest req,
> HttpServletResponse res);
>
> Any help would be greatly appreciated.
> Thanks in advance,
> jason
In JSP 1.0, there is no portable mechanism to request this. However, in
JSP 1.1 there is a new standard mechanism -- submit a request to the
page in question with a request parameter named "jsp_precompile". The
engine will compile your page for you, instead of executing it. See
Section 3.4 of the JSP 1.1 Specification (available at the JavaSoft web
site) for more info.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html