Hi all, You can prepare comeback link and put it to session or whereever You like: Map<String, String[]> parameters = ServletActionContext.getRequest().getParameterMap(); String redirectLink = namespace+"/"+actionMapping.getName(); if (parameters.size() > 0) { redirectLink += "?"; for (Entry<String, String[]> entry : parameters.entrySet()) { for (String value : entry.getValue()) { redirectLink += entry.getKey()+"="+value+"&"; } } } ServletActionContext.getRequest().getSession().setAttribute(REDIRECT_AFTER_LOGIN, redirectLink);
That's quick and dirty solution and won't work for many parameters but should get You started. Best greetings, Paweł Wielgus. 2009/7/20 <mailtolouis2020-str...@yahoo.com>: > I'm new in S2, so not much suggestion I can give u now. > > May be your interceptor store the entire action in the session. Once login > success, you get back the action and invoke it again. > > May be someone can give more better suggestion? > > Regards > Louis > > > > ________________________________ > From: mathias-ewald <nitehoax...@gmx.net> > To: user@struts.apache.org > Sent: Monday, July 20, 2009 3:17:47 PM > Subject: Re: Problem with LoginInterceptor > > > Hi, > > so what do you suggest? Isn't there any way to do that? > > cu > mathias > > > mailtolouis2020-struts wrote: >> >> I don't think it will preserve your parameter by default, I might be >> wrong, if it do, then that is another magic in S2 I didn't know that. >> >> For what I understand is there are 2 request from the user, >> 1) http://localhost:8080/projektseminar/rating/Rate?staffResourceId=1 >> 2) login submit >> >> I don't think you store a staffResourceId as a hidden param in the login >> page, if its not there you won't expect to come into your url. >> >> Regards >> Louis >> >> >> ________________________________ >> From: mathias-ewald <nitehoax...@gmx.net> >> To: user@struts.apache.org >> Sent: Monday, July 20, 2009 2:53:39 PM >> Subject: Re: Problem with LoginInterceptor >> >> >> Hi, >> >> yes I am using the latest version of struts2. Most likely the tutorials I >> used refer to other versions. I set the struts.xml as follows: >> >> --------------------------------------------------- >> <interceptors> >> <interceptor name="login" >> class="de.mathiasewald.projektseminar.interceptor.LoginInterceptor" /> >> >> <interceptor-stack name="defaultLoginStack"> >> <interceptor-ref name="servletConfig" /> >> <interceptor-ref name="params" /> >> <interceptor-ref name="login" /> >> <interceptor-ref name="prepare" /> >> <interceptor-ref name="chain" /> >> <interceptor-ref name="modelDriven" /> >> <interceptor-ref name="fileUpload" /> >> <interceptor-ref name="staticParams" /> >> <interceptor-ref name="params" /> >> <interceptor-ref name="conversionError" /> >> <interceptor-ref name="validation" /> >> <interceptor-ref name="workflow" /> >> </interceptor-stack> >> >> <interceptor-stack name="defaultInsecureStack"> >> <interceptor-ref name="servletConfig" /> >> <interceptor-ref name="params" /> >> <interceptor-ref name="prepare" /> >> <interceptor-ref name="chain" /> >> <interceptor-ref name="modelDriven" /> >> <interceptor-ref name="fileUpload" /> >> <interceptor-ref name="staticParams" /> >> <interceptor-ref name="params" /> >> <interceptor-ref name="conversionError" /> >> <interceptor-ref name="validation" /> >> <interceptor-ref name="workflow" /> >> </interceptor-stack> >> </interceptors> >> --------------------------------------------------- >> >> The errors about unfindable interceptors disappeard. But still, the >> parameter is not preserved. >> >> Any suggestions? >> >> cu >> mathias >> -- >> View this message in context: >> http://www.nabble.com/Problem-with-LoginInterceptor-tp24565562p24570331.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > -- > View this message in context: > http://www.nabble.com/Problem-with-LoginInterceptor-tp24565562p24570714.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org