You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Cypers <da...@skynet.be> on 2002/05/01 11:00:23 UTC

RE: Need Help: Please do help me

for page validation, i use the filter-mechanism from the servlet 2.3 api.
just write a filter which checks the parameters in your request, validates
them against an internal table , and forwards the filter chain to 1) the
page OR 2) an error page indicating that the user is not validated for the
request

if you attach your filter to the Struts controller , all requests can be
filtered (ic. validated) before the requests even reach the controller.

Regards,
David

ps : it's also very very easy to reuse your validation mechanism for other
servlets!!

-----Original Message-----
From: Struts Newsgroup [mailto:@Basebeans.comstruts@basebeans.com]
Sent: dinsdag 30 april 2002 19:40
To: struts-user@jakarta.apache.org
Subject: Re: Need Help: Please do help me


Subject: Re: Need Help: Please do help me
From: Vic C <vi...@basebeans.com>
 ===
For user authentication, use container security not Struts. Struts
example should not be based on login.

Vic
vivek shrivastava wrote:
> Hi,
>
> I know following questions have been asked or discussed so many times
> but I am still confuse. Please do help me.
>
> Once a users is logged in, I want to validate each page for a valid
> user. I understand that I can use "CheckLogon" tab in each .jsp page
> check for valid user. But I really don't think that it is good idea to
> mix flow and presentation.
>
> We have two other options.
>
> 1. We create a base class by extending struts's Action class and define
> a function to do validation and extend all application specific Action
> classes using that base class.
> 2. Or we extend ActionServlet class and define a function to do
validation.
>
> I think 2nd option is much more flexible and it does not have redundancy
> of code like first option.
>
> I want to know which one is best in real world.
> If someone has implemented it using either of method, please provide me
> some sample code so that I can implement it.
>
> Please Please do help me.
>
> Thanks
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>