On Wed, 28 Aug 2002, Leonard Wolters wrote:
> Date: Wed, 28 Aug 2002 18:26:23 +0200
> From: Leonard Wolters <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> Subject: using tags/servlets within jsp's
>
> Is it possible to include a tag (or servlet) in a jsp which directly
> writes to the outputstream (the same on as the jsp) ?
>
> Right now, tomcat is throwing a "org.apache.jasper.
> runtime.ServletResponseWrapperInclude.getOutputStream..."
> or a "java.lang.IllegalStateException: getOutputStream()
> has already been called for this response"
>
> In other words, is it possible that a tag (or servlet) together
> with a normal jsp build up a screen ?
>
Sure ... in the calling JSP page, use <jsp:include>. In the called page
or servlet, you have to use response.getWriter (to get a
character-oriented output stream), not response.getOutputStream() which is
for binary output. You can't mix character and binary output on the same
response.
> T.i.a.
>
> Leonard
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>