SivaKumarl wrote:
>
> I overwrite striepsExceptionHandler class ,when exception is occured i
> forwarding to error.jsp,my problem is i want to go back from error.jsp to
> the jsp page from where exception is raised.
> please solve my problem.
>
I will assume you are using the following pattern:
public void handle(Throwable throwable, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
First, depending on the version of Stripes you are using, you will have to
wrap the request object. This was a bug that was fixed in the 1.5 branch,
so if you are using the new beta, you may disregard the next step as Stripes
does this for you.
// see: JIRA issue (http://stripes.mc4j.org/jira/browse/STS-383) (fixed in
Stripes 1.5)
StripesRequestWrapper wrapper = new StripesRequestWrapper(request) {
@Override
protected void constructMultipartWrapper(HttpServletRequest request)
throws StripesServletException {
Locale locale =
StripesSecurityFilter.getConfiguration().getLocalePicker().pickLocale(request);
setLocale(locale);
}
};
ActionBeanContext context =
StripesSecurityFilter.getConfiguration().getActionBeanContextFactory().getContextInstance(wrapper,
response);
For Stripes 1.5 and greater, you can just get the context from the request
and cast it (I believe). Anyway, now that you have the context, you can get
the sourcePage, which is the page that did the initial request. This will
be the page you send the user back to:
Resolution source = context.getSourcePageResolution();
// do stuff, then finally...
source.execute(wrapper, response); // Stripes < 1.5
// source.execute(request, response); Stripes >= 1.5
}
Hope that helps.
--
View this message in context:
http://www.nabble.com/How-to-go-back-to-action-from-ExceptionHandling-page-tp16269575p16273581.html
Sent from the stripes-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users