Mantis - Resin
Viewing Issue Advanced Details
203 minor always 05-23-05 00:00 11-30-05 14:44
closed 3.0.12  
3.0.12 fixed  
none 3.0.14  
0000203: servlet.forward() error http 500
windows xp sp2, jdk 1.5x also on linux box

05-23-05 00:00   
We have a filter that executes some db related code and causes servlet forward error. here are the steps:

1. When filter throws exception resin catches it
2. Resin reads this exception and commits the response because this is the top level filter in the chain (That is where problem happened!!!)
3. Now, resin finds out that this is a 500 situation and forwards the response to error page as defined in config files.
4. Since resin itself committed this response in step 2, doing forward will fail and cause IllegleStateException. This is what we are seeing. Now, we couldn't have done anything to stop resin from closing the response. May be if we moved this filter to second position it might be okay because response is closed only for top most filter. I think you probably should do another check and close response only if there isn't any error, because in that case they are certain that request handler chain is finished.

Throwing illeglestateexception is correct according to the standards, but I did not intend to point this as a bug. You would be in better position to konw it.
05-23-05 00:00   
I was getting some undeclaredexception while adding description in the issue while creating it so i added issue as a comment. sorry about that. thanks for your help
05-23-05 00:00   
server/1762, server/1763

The fixed bug has slightly different behavior than the reported one, so if there is a configured issue, please create a .war file which duplicates the issue.