tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bill cao <drop_me_an_m...@yahoo.com>
Subject java.lang.IllegalStateException
Date Wed, 06 Sep 2006 16:15:40 GMT
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 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message