tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Madynski <JMadyn...@Netcentives.com>
Subject Problem processing a Post with getRequestDispatcher.include()
Date Tue, 01 Feb 2000 17:04:19 GMT
Has anyone had this problem with a post request??

I am processing a post request in a servlet that does this a couple of
times: getRequestDispatcher(url).include(req, res)

The includes are not working because I call HttpUtils.parsePostData(x,x) in
doPost in the main servlet,
then when the included servlet goes to read the post data, which has already
been read, and then
it blows the following exception.

Is there any workaround for this in my code?
It works in JRUN.

java.lang.IllegalArgumentException: Short Read
	at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
	at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:98)
	at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java,
Compiled Code)
	at
org.apache.tomcat.core.RequestImpl.getParametersCopy(RequestImpl.java,
Compiled Code)
	at
org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.j
ava, Compiled Code)
	at xxx.RequestDispatcherInclude(CServletData.java, Compiled Code)
	at xxx.BaseServlet.HandleRequest(CBaseServlet.java:304)
	at xxx.CBaseServlet.doPost(CBaseServlet.java:181)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:240)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:347)
	at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:146)
	at
org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:305)
	at java.lang.Thread.run(Thread.java:479)

Mime
View raw message