• Post Reply Bookmark Topic Watch Topic
  • New Topic

Force Tomcat to throw IllegalStateException  RSS feed

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
There are countless threads regarding IllegalStateException with Servlets / Jsp
And tons of tips on how to avoid writing to the response after it was committed,

Apparently Tomcat container is allot more flexible then WebSphere, and it swallow some of the IllegalState Exceptions,
Our team develop & debug the application on Tomcat and then IllegalStateException problems bloom on WebSphere (already twice)

Is there a way to tell Tomcat not to ignore IllegalState Exceptions?

Thank you


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sharon whipple wrote:Is there a way to tell Tomcat not to ignore IllegalState Exceptions?

Maybe it's just not an IllegalState on Tomcat? In other words, how do you know there's an exception that Tomcat is swallowing?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think Tomcat will "swallow" an IllegalStateException" as they are generally caused by a programmer conceptual error that needs to be addressed.

As David said: consider the possibility that Tomcat builds the Response buffer differently from WebSphere so does not trigger the exception.

In any case you should take the exception as an indicator of a design flaw.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!