if you want to create action (actually action names) on the fly 2 options http://struts.apache.org/2.0.11.2/docs/rest-plugin.html provided disableControllerScanning = false e.g. struts.configuration.rest.disableControllerScanning=false
the other option is to go with Spring MVC dynamic MultiActionController http://static.springframework.org/spring/docs/1.2.x/reference/mvc.html#mvc-controller far more capable to dyanmically craft your method but then again far more complex the method name which is yielded is defined to have the following signature: // actionName can be replaced by any methodname ModelAndView actionName(HttpServletRequest, HttpServletResponse);HTH Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Tue, 23 Sep 2008 01:23:50 +0200 > From: [EMAIL PROTECTED] > To: user@struts.apache.org > Subject: Re: quest on dynamic redirect > > I thought of the same problem some time ago. > > - during the execution of I all information for the correct redirect is > stored (session, bean... whatsoever) > - during the login action, after the login is confirmed the action > realizes that a redirect is requestet (to a.action) > > now the login action can get a result like this > > <result name="redirect" type="......">${redirectTo}</result> > > now the action is asced for the correct action name/tiles view... it > shall return. > > Greetings, > Alexander > > Gianluca Musella schrieb: > > This is my requirement: > > > > - the user asks for a resource, say A.action > > - the controller fires a custom interceptor I to authenticate the user > > - user isn't authenticated, so I redirect to L, the login page > > - user enters valid credentials > > - the controller redirect to the original requested A.action > > > > The problem is that the results of the login action are statically > > cablated in struts.xml: > > > > <result type="tiles" name="success">home</result> > > <result type="tiles" name="failure">login</result> > > > > But I need a new case to redirect dynamically to A.action (I can't > > provide statically all cases in my struts.xml). > > > > How can I have this behaviour? > > > > thanks > > > > Gianluca > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008