Re: [Webwork-user] redirect view at runtime
Brought to you by:
baldree,
rickardoberg
From: Vaishakhi A. <vai...@ar...> - 2002-06-21 18:33:00
|
Hi , I understand from the webwork mailing list that you have been able to = get the redirect working but am not sure if I understand how though. I want to redirect to another url and pass along some params as well so = I cannot call the standard redirect.action in my actions.xml. I tried doing the following code in my action before I do a return = SUCCESS. /*//first I create the url that I want to redirect too */ url =3D createUrl(user.getID(), roleString, false); Redirect redirect =3D (Redirect)ActionFactory.getAction("Redirect"); redirect.setUrl(url); redirect.execute(); But I get the following exception java.lang.IllegalStateException: Cannot forward after response has been = committed at = org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispa= tcher.java:367) at = org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatc= her.java:355) at = webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat= ionFilterChain.java:247) at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte= rChain.java:193) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:243) at = org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.jav= a:566) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:47= 2 ................... ..................... Please help me get around this Shall highly appreciate it Thanks Vaishakhi |