Have looked at extending ActionConfig? You could add a field for assigning roles. If you wanted to allow more than one, it would let you do:
<action path="/app/main" type="com.symbol.mobilecommerce.analysis.actions.app.Main" name="app.main" > <forward name="PAGE_SRC" path="/app/main.jsp"/> <forward name="PAGE_ACCESS_DENIED" path="/index.jsp"/> <set-property property="addRole" value="admin"/> <set-property property="addRole" value="superuser"/> </action> The rest is really up to you. Just giving you some ideas. -- James Mitchell Software Engineer/Struts Evangelist > -----Original Message----- > From: Sloan Seaman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 25, 2003 2:29 PM > To: Struts Users Mailing List > Subject: Passing parameters to Actions > > > In the struts-config.xml file I want to pass a few parameters > to my actions > but it looks like the DTD only supports one "parameter" tag. > > I.E.: > <action path="/app/main" > type="com.symbol.mobilecommerce.analysis.actions.app.Main" > name="app.main" > parameter="admin" > > > <forward name="PAGE_SRC" path="/app/main.jsp"/> > <forward name="PAGE_ACCESS_DENIED" path="/index.jsp"/> > </action> > > When I would rather do something like: > <action path="/app/main" > type="com.symbol.mobilecommerce.analysis.actions.app.Main" > name="app.main" > > > <forward name="PAGE_SRC" path="/app/main.jsp"/> > <forward name="PAGE_ACCESS_DENIED" path="/index.jsp"/> > <parameter name="ROLES_ALLOWED" value="admin"/> > </action> > > Now, I know there is a roles attribute but we are doing out > own security > model and are not using request.isUserInRole(). > > (BTW: is there any way to write to whatever > request.isUserInRole() used to > do its lookup so we can use it?) > > Is there any way to have parameters passed like how I would like? > > I could spoof <forward> to something like <forward > name="ROLES_ALLOWED" > path="admin"/> but I would rather not. > > Thanks! > > -- > Sloan > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]