What you suggest is fine, but from my limited experience, a caveat:
Just be sure that from within your servlet code, you don't do:
ServletOutputStream out = response.getOutputStream();
but instead, do:
PrintWriter out = response.getWriter();
The latter is compatible with being included in a JSP page.
-Mark
[EMAIL PROTECTED]
On Wed, 25 Apr 2001, Andy Nuss wrote:
> What about:
>
> out.print("some html");
> getServletContext().getNamedDispatcher("myservletalias").include(req,
> resp);
> out.print("more html");
>
>
>
> -----Original Message-----
> From: Jann VanOver [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 3:00 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: <jsp:include [servlet]> --> "InputStream already obtained
> for this request"
>
>
> You can't include a servlet.
>
> You can call a servlet through a URL or you can include JSP
>
> I have no answers for your other questions
>
> -----Original Message-----
> From: Michael Toulouse [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: <jsp:include [servlet]> --> "InputStream already obtained for
> this request"
>
>
> I'm trying to call include a servlet from JSP. The servlet needs to
> parse CGI data from the InputStream object of the HttpServletRequest.
> Is there any way to get Tomcat not to obtain the InputStream? Or, if
> that is not possible, is there a way to call recycle() on the
> implementation of the HttpServletRequest?
>
> Thanks in advance.
>
> --
> Michael Toulouse
>