aspose file tools
The moose likes Struts and the fly likes Sample Error jsp page? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Sample Error jsp page?" Watch "Sample Error jsp page?" New topic
Author

Sample Error jsp page?

A Harry
Ranch Hand

Joined: Jan 23, 2002
Posts: 124
I'm trying to setup a error page that will show struts errors or other errors. I have a jsp page that has the isErrorPage="true" set at the top & is defined in web.xml as

<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/jsp/error.jsp</location>
</error-page>

in the jsp page Struts errors are handled like this -

<logic:messagesPresent>
<table width="400" border="1" bordercolor="#FF0000">
<tr>
<td>
<html:errors/>
</td>
</tr>
</table>
</logic:messagesPresent>
<logic:messagesNotPresent>
An unspecified error has occurred.
</logic:messagesNotPresent>

I want to display in the messagesNotPresent bit the top cause of the exception thrown i.e SQLException, ServletException etc...

Anybody got an example of how best to show this?

many thanks

harry
 
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.
 
subject: Sample Error jsp page?
 
Similar Threads
using Multiple submit buttons.
Displaying struts errors
How to transport the stacktrace of an Exception from a Action to a Error-JSP?
Re, Handling Error using ActionMessages
server side validation errors