• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error page does not show my exceptions

 
Anantha Ramachandra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have defined an error page



and the following to call the exception from the servlet



However I am not able to see the exception in the error page I have defined
I am seeing it in a an Status 500 error page as below

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

com.anand.webapp.implementation.UserManagerException: Invalid user name and password
com.anand.webapp.implementation.UserManager.authenticateLogin(UserManager.java:10)
com.anand.controller.LoginServlet.processRequest(LoginServlet.java:50)
com.anand.controller.LoginServlet.doPost(LoginServlet.java:40)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.
Apache Tomcat/6.0.29

Where am I going wrong ?
Thanks in advance
 
dileep keely
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is HTTP Status 500 -error in your case could be the way in which the browser is treating to the status of the http response.
Make sure Options in IE, to display friendly http errors (uncheck).

Just my thoughts!!
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Anantha.

Check in my signature. There is a post that talks about exceptions.

Does your app works on Firefox? If this problem happens only happen in IE, you could check the option that "dileep keely" said above, or you could change a parameter server status in your response.
 
Monika Joshi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anantha,

You are getting the requestdispatcher from the request object. This version of the requestdispatcher uses "relative url" as the method parameter. I notice that in the code, you have put in request.getRequestDispatcher(errorPageURL).forward(request,response);, where errorpageURL maps to errorPage.jsp. Now this should be a relative path, which means this shd begin with a "/" and would be interpreted as relative to the current context root.

Hope this helps.

Regards,
Minakshi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!