You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bruno CROS UNILOG <bc...@unilog.fr> on 2000/02/28 16:32:10 UTC

jsp:include issue with sevlet

    I decided to encapsulate a servlet (need to compile code to develop) in
a nice jsp.
I read the jsp specif to learn about and found jsp:include action.
But it seems to work well with jsp and not with HttpServlet invoking.

I get this and can't see what's the problem.


Included servlet error: 500: Internal Servlet Error:

java.lang.IllegalStateException: cannot find message associated with key :
serverResponse.outputStream.ise
 at org.apache.tomcat.core.Response.getOutputStream(Response.java:203)
 at
org.apache.tomcat.core.HttpServletResponseFacade.getOutputStream(HttpServlet
ResponseFacade.java:146)
 at habil.HASFrontal.doGet(HASFrontal.java:25)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
 at
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:6
26)
 at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java,
Compiled Code)
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
 at
org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.j
ava:215)
 at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:348)
 at
_0005carchimede_0002ejsparchimede_jsp_0._jspService(_0005carchimede_0002ejsp
archimede_jsp_0.java:63)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
 at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:161)
 at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled
Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
 at
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:6
26)
 at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java,
Compiled Code)
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
 at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:144)
 at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:304)
 at java.lang.Thread.run(Unknown Source)


I don't have source code, where can we found it ?

Thanks



Re: jsp:include issue with sevlet

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Bruno CROS UNILOG wrote:

>     I decided to encapsulate a servlet (need to compile code to develop) in
> a nice jsp.
> I read the jsp specif to learn about and found jsp:include action.
> But it seems to work well with jsp and not with HttpServlet invoking.
>
> I get this and can't see what's the problem.
>
> Included servlet error: 500: Internal Servlet Error:
>
> java.lang.IllegalStateException: cannot find message associated with key :
> serverResponse.outputStream.ise

Tomcat 3.0 was missing an entry in its messages file.  The underlying problem
is that you are trying to call response.getOutputStream() after
response.getWriter() has already been called, which violates the servlet spec
requirements.  Your included servlet should use response.getWriter() as well to
gain access to the output stream.

> [snip]

> I don't have source code, where can we found it ?
>

http://jakarta.apache.org and follow the "Download" links for various ways to
get the source.


>
> Thanks
>

Craig McClanahan