Redirecting to a common error page in struts

S

sh

How to redirect to a common error page on occurance an Exception,in
struts?



declare global error page in the Struts-config.xml

<global-exceptions>
<exception key="error.general" type="java.lang.Exception"
path="/../error.jsp" />
</global-exceptions>

<global-forwards>
<forward name="error" path="/../error.jsp" />
</global-forwards>

and provide the mapping.findForward ("error"); in the Action class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top