I think you can do what you want by simply creating your own
subclass/implementation
of HttpServletRequest and HttpServletResponse to pass to the
service() method of your servlet (or whatever the equivalent is for JSPs)
Just make sure that the HttpServletResponse.getOutputStream() returns
the FileOutputStream you want.
If you do things that way, then you are not tied to Tomcat, and you
can even use servlets and JSPs that you didn't write!
Hope this helps!
-Mike Jennings
----- Original Message -----
From: "Alberto Romei" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 10:32 AM
Subject: Info on customizing jspc - jasper
> I wanted to use JspC to generate a java program (not exactly a servlet)
> which writes its output to a file on the disk instead of the
> HttpServletResponse's JspWriter.
>
> In practice, i just need to customize the fixed parts of the generated
code
> like:
>
> public class Foo extends HttpJspBase {
>
> or
>
> public void _jspService(HttpServletRequest request,
HttpServletResponse
> response)
> throws java.io.IOException, ServletException {
>
> >From what i've seen, i could simply substitute JspParseEventListener in
the
> jasper jars, but in this way i would "throw away" the normal processing of
> JSPs.
>
> So, what is the correct way to customize the JSP compilation ?
> Must i subclass org.apache.jasper.compiler.Compiler and call
> MyCompiler.something() instead of jspc.parseFiles() ? (that would be a lot
> of work... )
> If so, is there any kind of documentation on how to correctly write a
custom
> JSP compiler ? (possibly working with future versions of tomcat, too)
>
> Any suggestion is appreciated.
>
> Thanks
>
> Alberto
>
> P.S.
> I'm new to tomcat source, so please be patient.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>