Java_Problem
asked on
Error code from Servlet
Hello J2EE Gurus
I am posting to an external servlet. This servlet is outside my domain and all it does is transfer
my application to a jsp page in my domain after doing some work at his end.
99% is servlet throws a Error code of 500 and then I never get to my page.
How should I handle this situation using error codes ??. I don't have any access to this servlet. All
All I do is post to this servlet and it redirects to my JSP page
Thanks
I am posting to an external servlet. This servlet is outside my domain and all it does is transfer
my application to a jsp page in my domain after doing some work at his end.
99% is servlet throws a Error code of 500 and then I never get to my page.
How should I handle this situation using error codes ??. I don't have any access to this servlet. All
All I do is post to this servlet and it redirects to my JSP page
Thanks
Check that it's available before transferring control to it. Ulimately you'll have to get them to fix it if the problem's at their end
ASKER
How can I check even before I send the parameters that this servlet expects from my page. ? I know that it does some back end calls after getting required parameters and then only forwards to my JSP page.
So I need to have the response that it throws 500 ERROR and handle that.
So I need to have the response that it throws 500 ERROR and handle that.
What i was getting at is POSTing programmatically to the servlet and reading the response before progressing further
ASKER
I found the answer of this question. Please delete this question
What is the answer? Was there something wrong in the servlet URL or was there an internal compilation error or something?
ASKER
if(response.SC_INTERNAL_SE RVER_ERROR == 500){
RequestDispatcher rd = request.getRequestDispatch er("target .jsp");
rd.forward(request, response);
**************
PLEASE DELETE THIS QUESTION
**************
RequestDispatcher rd = request.getRequestDispatch
rd.forward(request, response);
**************
PLEASE DELETE THIS QUESTION
**************
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.