tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric H." <ehara...@usc.edu>
Subject Is it possible to use RequestDispatcher to include a jsp?
Date Thu, 15 Jun 2000 19:37:05 GMT
I'm using Tomcat with Apache, and inside of a servlet I try:
RequestDispatcher dispatch=req.getDispatcher("../login.jsp");
dispatch.include(req,res);

and include a couple of html files the same way. (req=HttpServletRequest
and res=HttpServletResponse)

Just including the plain html files is ok, but when I include a jsp, I get
the following error that leads me to believe Tomcat is flushing the output
and attempting to get a new Writer (causing an Exception since
RequestDispatcher.include files shouldn't do that). I tried increasing the
buffer size, but that didn't seem to work...

Included servlet error: 500

Location: /isd/nwdb/servlet/isd.nwdb.nwdbDispatcher

Internal Servlet Error:

java.lang.IllegalStateException: OutputStream is already being used for 
 this request at
java.lang.Throwable.fillInStackTrace(Native Method) at
java.lang.Throwable.fillInStackTrace(Compiled Code) at 
java.lang.Throwable.(Compiled Code) at 
java.lang.Exception.(Compiled Code) at
java.lang.RuntimeException.(RuntimeException.java:47) at
java.lang.IllegalStateException.(IllegalStateException.java:45) at
org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210) at
org.apache.tomcat.core.HttpServletResponseFacade.getWriter(HttpServletResponseFacade.java:148)
at
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:154) at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:146) at
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:191) at
_0002flogin_0002ejsplogin_jsp_0._jspService(_0002flogin_0002ejsplogin_jsp_0.java:73) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at
org.apache.jasper.runtime.JspServlet.service(Compiled Code) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code) at
org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.java:262) at
isd.nwdb.nwdbDispatcher.doDispatch(Compiled Code) at
isd.nwdb.nwdbDispatcher.doGet(nwdbDispatcher.java:18) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code) at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at
org.apache.tomcat.service.TcpWorkerThread.run(Compiled Code) at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at 
java.lang.Thread.run(Thread.java:485)

-Eric Harashevsky



Mime
View raw message