This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
When I run the project, the BPIMSExceptionHandlerServlet catched the NullPointerException. But the problem is the program keep running. It seems a loop in doPost method. It just keeps running. I have debug the project. The program keep running from the first line to the last line in doPost method. Anybody know what's wrong here? Thanks in advance.
David Newton wrote:
In any case, the ability to redirect also depends on not having written anything to the response yet.
Yes, David is more precise than me :thumbup:
Haifeng Jiang
Ranch Hand
Joined: Dec 14, 2008
Posts: 40
posted
0
Sagar Rohankar wrote:
David Newton wrote:
In any case, the ability to redirect also depends on not having written anything to the response yet.
Yes, David is more precise than me :thumbup:
Thanks for your reply.
Now I correct the code.
but the program cannot find the error.html file. Give me a 404 error code. I also tried "error.html" or "/error.html". none of them work. Now I don't know what is the correct path in the sendRedirect() method. Do you know how to write in the method?
My project structure is:
BPIMS_Web --- WebContent --- WEB-INF --- jsp --- common --- error.html
- --- welcome.jsp
error.html and welcome.jsp are in the same directory.
Sagar Rohankar wrote:Why don't you try Exception Handling + Struts. Struts provides Global exception handling for your web app.
As you may know if the jspException throwed from jsp level. Struts will not able to cacth this type of exception. So I have to think out a solution to handle it. Thanks
Sagar Rohankar wrote:Why don't you try Exception Handling + Struts. Struts provides Global exception handling for your web app.
As you may know if the jspException throwed from jsp level. Struts will not able to cacth this type of exception.
Hmm, I know about jspException, but never cared about it, Anyways, thanks.
Haifeng Jiang
Ranch Hand
Joined: Dec 14, 2008
Posts: 40
posted
0
Sagar Rohankar wrote:
Eric Jiang wrote:
Sagar Rohankar wrote:Why don't you try Exception Handling + Struts. Struts provides Global exception handling for your web app.
As you may know if the jspException throwed from jsp level. Struts will not able to cacth this type of exception.
Hmm, I know about jspException, but never cared about it, Anyways, thanks.
welcome.
Now I do a test. If I create NullPointerException manually in jsp. the servlet cannot catch it. Don't know why. Anybody can help on this?Thanks.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.