You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by bill cao <dr...@yahoo.com> on 2006/09/06 18:15:40 UTC
java.lang.IllegalStateException
I am using Apache Tomcat/5.0.28
Here is the code of traffic.jsp. it can forward to yyyy.html with no problem, but when forwarding to zzz.html, it throws java.lang.IllegalStateException: getOutputStream() has already been called for this response
String serverName = request.getServerName();
if (serverName.toLowerCase().indexOf("xxxx") != -1)
response.sendRedirect("/xxxx");
else if (serverName.toLowerCase().indexOf("yyyy") != -1)
pageContext.forward("yyyy.html");
else if (serverName.toLowerCase().indexOf("zzzz") != -1)
pageContext.forward("zzzz.html");
else
response.sendError(404);
The only difference between yyyy.html and zzzz.html is that one is bigger than the other. /xxxx is also working.
This is very strange!!! Anybody know What is going on?
---------------------------------
Get your email and more, right on the new Yahoo.com