> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 21, 2000 19:23
> To: [EMAIL PROTECTED]
> Subject: Re: How to do my own JSP processing
> 
> Sounds like you are planning on inventing your own variant of 
> a servlet+JSP server, since you're wanting to change or ignore
> many of the spec requirements.
> And you will end up with an app that will only run in your 
> own server.  Unless you like building servers as a hobby, 
> you've got a *lot* of hard work ahead of you.
> 
> I would suggest you look at how you can architect your 
> application *within* the requirements of the servlet and
> JSP specs.  That way, you can focus on writing an app rather 
> than a server, and have some assurance that you can run that app
> elsewhere if and when you outgrow Tomcat.

Actually I have my own template language which is compiled to a JSP file.
Everything is supposed to be as much Servlet 2.3 spec conformant as
possible. Here is a simplistic view on my main servlet

service()
   1.  begin database transaction
   2.  do some business logic
   3.  execute JSP file
   4.  commit transaction
   5a. if commit successful send response content to the network 
   5b. if not generate error response (and discard result of JSP)

The problems with 3.) are
I.)   the JSP files are located outside my servlet context 
II.)  JSP execution must be buffered because the content is not be sent
before the database transaction commits
III.) the JSP execution must be able to set response header lines (e.g.
cookie)
IV.)  it should be possible in JSPs to use tag libraries and do all other
things possible if the JSP is served directly by Tomcat

Because of 
I.)   I cant use a "simple" servlet request dispatcher
II.)  forward() won't work because if the forward() returns the response is
already committed and closed by the container
III.) includes() won't do because I can't set headers

On top of this I want my servlet to pick a JSP file, run it, capture the
output and send this output be email before saying "sending email was
successful." over HTTP.

>From what I read about Jasper it should be possible to call it compile my
JSPs and trigger their execution independent of the all of this is running
in a servlet itself or a standalone application, right?

Thanks
Christian
PS: I know it will be a nice piece of work ... 
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineer    phone: +49 3641 50 3453

Reply via email to