Nishant,

In JSP 2.0, we laid some of the groundwork for running JSPs independently of a container. Here are some pointers:

1. The JspContext API does not rely on any Servlet APIs.  JspContext
   is the new superclass for PageContext.
2. JspFragment does not rely on any Servlet APIs
3. Tag Files do not rely on having a request / response and do
   not need any Servlet APIs.

I'm sure it's possible to emulate a full Servlet environment, but I think the right way to do this is to start the execution from a tag file instead of a JSP page. Tag files were designed to be able to run without a container if need be. You'd still need to emulate the request/session/application scopes, but that's about it. Tag files have the same capabilities as JSP pages, but they don't need a ServletRequest / ServletResponse.

This is work the JSP is eventually interested in formalizing in the spec, so we'd be very interested in your feedback. Please report back on our JSP spec mailing list with your progress and findings:

    https://jsp-spec-public.dev.java.net/

---
Mark Roth, Staff Engineer, Java Software
JSP 2.0 / 2.1 Specification Lead
Java Enterprise Community Leader
http://community.java.net/java-enterprise
Sun Microsystems, Inc.


Nishant Kumar wrote:
hi,
        I am generating a html report using JSP. we also exporting this report
to pdf. since the fop conversion takes quite a long time we have to do
this export asynchronously. for this we have to use velocity. is there
any way i can use JSP for this purpose.
        Had it been sync, we could have used JSP to create the fo which could
have been transformed using a filter. but in the async mode tomcat
reuses the same request and response objects for some other request, so
can't use this trick.
        Though JSP and servlets are meant for synchronous request handling, I
THINK executing JSP independently should be possible if we are able to
pass it some dummy request and response objects.
        I am ready to tinker with tomcat code locally to get this working. Any
advice or pointers to relevant piece of code?? I think this is dev
question, if not I am sorry for posting on the wrong list.

thanks,
nishant


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to