Question

In Stripes, If there is a wrong action class mapping, the default behaviour of Stripes is that it forwards the control to the same JSP from which the request is made and gives out a complete error stack.

I plan to modify this behaviour and want to give a more user friendly message in case of error.

Said that, Is there a way to redirect to a new page (an error page) in case of wrong action mapping in Stripes?

Thanks.

Was it helpful?

Solution

You can overwrite the behavior of ActionBeanContext#getSourcePageResolution. You can do what you want there.

OTHER TIPS

It's been a while since I last set up a Stripes application from scratch, so I don't remember that behavior. Anyway, you can set up error pages the standard way in web.xml:

<error-page>
    <error-code>404</error-code>
    <location>/path/to/page.jsp</location>
<error-page>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top