Re: Right way for exception handling

2011-11-18 Thread Eric Lentz
Make sure that devMode is false. The behavior is a bit different if in devMode.

Re: Right way for exception handling

2011-11-17 Thread Li Ying
Hi, Ilya: > But struts-2 breaks this scheme. > > 1) it does not pass exception to container so container can't log it. I used struts2 for several years. In our projects, struts-2 does not break this schema. I have read the source of struts2. When an exception is thrown from action execution, str

RE: Right way for exception handling

2011-11-11 Thread Ilya Kazakevich
Thank you. > I'm also not sure I'd purposefully send a 500 status > code if I had the choice, but I guess that's up to you. The browser > typically gives back a pretty ugly page for such a return status, IMO. Only IE does this. And only if "friendly" errors are enabled. I need 500 error because

Re: Right way for exception handling

2011-11-11 Thread Eric Lentz
> 1) Why do not struts passes exception to container by default? Could I configure it to do so? I don't have time to answer all of your questions well, but you may want to look here: http://struts.apache.org/2.2.1/docs/httpheader-result.html That result type will permit the sending of any code

Right way for exception handling

2011-11-11 Thread Ilya Kazakevich
Hello, In bare container (tomcat) everything is good: Servlet throws exception and container logs it and displays 500 error page with certain status. Each uncounght exception should lead to 500 error because uncought exception is _program_ error. But struts-2 breaks this scheme. 1) it does not