There's a number of ways to handle scenarios like this.  An easy one would
be something like this:
Assume you have start.jsp and next.jsp, and StartAction and NextAction.

In StartAction have two results: SUCCESS and NOT_ALLOWED.  SUCCESS goes to
NextAction, NOT_ALLOWED returns to start.jsp.

In the execute() method of StartAction, check the user's credentials.  if
they have the right credentials, return SUCCESS.  if they do not, do
addActionError("you are Not Allowed") and return NOT_ALLOWED.

Another alternative would be to restrict page access with something like
Spring Security, which is overkill if there's only a few pages you need to
manage access to, but darned handy if any more than that.

jk

On Tue, Apr 21, 2009 at 10:31 AM, Stefano <elste...@gmail.com> wrote:

> have u solved?
>
> i've the same issues to do.
>
>
> On Mon, Apr 20, 2009 at 16:29, elyes sallem <elyes.sal...@gmail.com>
> wrote:
>
> > Hello,
> > i have a struts application, which can be used by different user profile
> > among the profile, there is  one who can access some pages
> > so if he try to access to one page , i will diplay a warning message in
> the
> > depart page
> > so, i wanna know , after checking the user profile in the action, how can
> i
> > forward him to the source page, i.e he remains in the same page, and i
> will
> > display a warning message to inform him that this page is inaccessible
> >
> >
> > Thanks
> > Regards
> > Elyes
> >
>
>
>
> --
> Stefano
>



-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com

Reply via email to