Hi Russ,
 
   You may want to try creating a global result in your struts.xml:
 
<global-results>

<result 
name="change-password">/pages/user/login/force_change_password.jsp</result>

</global-results>

Then in your interceptor return the result name "change-password" 
 
That is how we accomplished something similar to your pblem.
 
Hope this helps.
-Nate

________________________________

From: Russell Neufeld [mailto:russ.neuf...@hds.com]
Sent: Mon 6/29/2009 5:19 PM
To: Struts Users Mailing List
Subject: Need help writing an interceptor to force a user to change their 
password



Hi all,
  
    I'm trying to implement functionality which will force a user to a 
change-password page if a certain bit is set on their user account.  That is, 
no matter what action they are attempting to take, I'd like to intercept the 
request and show them a change-password page.  I've written a few struts2 
interceptors before, but this one has me stumped.  I can easily get the user 
principal object and see whether or not I need to insert the change-password 
page, but I'm not sure what to do next.  I was thinking about trying to change 
the action object to one which would simply return a string pointing to the 
change-password jsp, but I don't know how to replace the action object on the 
invocation object (and that doesn't seem like a good idea).  I'd prefer not to 
solve this with a redirect because I'd like to use some of the context of 
current request in the rendering of the change-password page.

    Any ideas?  Thanks,

        Russ



---------------------------------------------------------------------
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

Reply via email to