You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Hond4 <ho...@gazeta.pl> on 2005/03/19 08:49:53 UTC

Proper way to do it

Hallo list members!

I'm looking for best practise how to implement password change for my 
appliaction.
I'm using securityfilter for auth, problem is that i would like to 
create forward to password change page if user password == "default".
Is it possible to put some logic into ActionServlet's service() to check 
is user password == "default" and then forward to PasswordChange action? 
I know that I can crete base action (with passowrd check logic) for all 
action's but i think there should be more proper way to solve my problem.

Thanks for help,
H0nd4

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


Re: Proper way to do it

Posted by Hond4 <ho...@gazeta.pl>.
> U must test for the correct password and if the password is wrong to 
> thow an global exception
> That exception u can use at struts-config.xml at
> 
> <!-- ================================= Global Exception Definitions -->
> 
> <global-exceptions>
> </global-exceptions>
> 
> to forward to a page.
> 
> The simplest is to use global-forward

but do I have to test for the correct password in all actions ? is it 
possible to put this test into controller ?

Best regards,
H0nd4



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


Re: Proper way to do it

Posted by Jim Theodoridis <st...@tera.gr>.
Hond4 wrote:

> Hallo list members!
>
> I'm looking for best practise how to implement password change for my 
> appliaction.
> I'm using securityfilter for auth, problem is that i would like to 
> create forward to password change page if user password == "default".
> Is it possible to put some logic into ActionServlet's service() to 
> check is user password == "default" and then forward to PasswordChange 
> action? I know that I can crete base action (with passowrd check 
> logic) for all action's but i think there should be more proper way to 
> solve my problem.
>
> Thanks for help,
> H0nd4
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
U must test for the correct password and if the password is wrong to 
thow an global exception
That exception u can use at struts-config.xml at

<!-- ================================= Global Exception Definitions -->

 <global-exceptions>
</global-exceptions>

to forward to a page.

The simplest is to use global-forward




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