You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by hns <ha...@yahoo.com> on 2008/03/01 06:56:12 UTC

Re: about current action name acsess

Thanks to you
and also thanks to kedar for great logic
but i dont know why postLoginURL remains empty in my case
so i have choose way of session it works fine right now but i dont know
about future problems of it
i have done like this

 Inside interceptor i wrote
------------------------
  if (!isAuthenticated) {

String urlGoingTo = actionInvocation.getProxy().getNamespace()+"/"+
        	 actionInvocation.getProxy().getActionName()+".do";
        	 session.put( "actionurl", urlGoingTo);


struts.xml
----------------------
<action name="Login_*"  method="{1}" class="authentic.Login">
            <result name="input">/Login.jsp</result>
            <result name="cancel" type="redirect-action">Welcome</result>
            <result type="redirect-action">MainMenu</result>
            <result name="redirect"
type="redirect">${session.actionurl}</result>
            <interceptor-ref name="guest"/>
        </action>
-------------------

Login.java

-------------
if(session.get("actionurl") != null && !session.get("actionurl").equals(""))
        	 {
        		 return "redirect";
        	 }
                  
        	 return SUCCESS;
--------

Thanks
-- 
View this message in context: http://www.nabble.com/about-current-action-name-acsess-tp15736383p15773049.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org