For Programmers: Free Programming Magazines  


Home > Archive > Java Security > March 2004 > Struts: authenticating next action









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Struts: authenticating next action
Oscar kind

2004-03-19, 8:55 pm

Hi,

I'm writing a simple web application, where a user can perform several
actions from a single page. I know the user has one of the required roles
for the current page; Struts (I use version 1.1) makes sure of that.

However, I also want to determine if a user may go to the page my Action
implementation refers to. The forward used for this is tied to the name of
the action supplied by the ActionForm.

So far, I think I should do the following:
1 Find the ActionForward that will be used if the action is executed
2 Find the URL the ActionForward refers to
3 Find the ModuleConfig for the new URL
4 Find the ActionMapping for the new URL using its ModuleConfig
5 Check if the user has one of the required roles for this ActionMapping

Is this a good aproach?
If so: how do I do steps 2&3 when using Struts modules?
Is there a better approach?

Any help will be greatly appreciated.


Oscar

--
Oscar Kind http://home.hccnet.nl/okind/
Java/J2EE Developer email available on website
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com