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.
In the application.xml:
I use below url to access my project:
http://localhost:9080/partnerworld/incentives/management/welcome.wss?user=eric
when I click one link in the welcome page to trigger the exception to throw out to the
servlet level, the servlet can catch the exception. But the redirect method doesn't work. Kindly advise.