| Author |
Global excpetion-getting print stack trace?
|
sudhakar Tadepalli
Ranch Hand
Joined: Dec 27, 2001
Posts: 130
|
|
Hi, I am trying to get print stack trace from exception object i am throwing from the action class, which was declared in the global-exception section of the struts-config.xml file.When i get exception,it is forwarding to error.jsp and printing message from Application.resourceProperties file. But i also want to print Exception message on the error.jsp and the stack trace.I have exception object in the request scope .Please see the sample code Struts-config.xml : <global-exceptions> <exception key="errors.nullpointer" type="java.lang.NullPointerException" path="page.error" scope="request"/> <exception key="errors.exception" type="java.lang.Exception" path="page.error" scope="request" /> </global-exceptions> //error.jsp <HTML> <BODY> <%@ page isErrorPage="true" %> <P> reported the following error: <logic:messagesPresent> <UL> <html:messages id="error"> <LI><font color="RED"><bean:write name="error" /></font></LI> </html:messages> </UL> </logic:messagesPresent> </BODY></HTML> Thanks Sudhakar
|
 |
sudhakar Tadepalli
Ranch Hand
Joined: Dec 27, 2001
Posts: 130
|
|
I still waiting trying to solve this, any help please? -Sudhakar
|
 |
sudhakar Tadepalli
Ranch Hand
Joined: Dec 27, 2001
Posts: 130
|
|
The current jsp page is showing a message from Application properties file. I am trying to print generic message on error page. If I put the following line in error.jsp i am getting [ServletException in:/error.jsp]null message. <font color="red"> <%= exception.toString() %><br> </font> -Sudhakar
|
 |
 |
|
|
subject: Global excpetion-getting print stack trace?
|
|
|