struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hns <hardik_...@yahoo.com>
Subject Re: about current action name acsess
Date Sat, 01 Mar 2008 05:56:12 GMT

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


Mime
View raw message