On Wed, 8 Jan 2003, Seth Milder wrote:
> Date: Wed, 08 Jan 2003 17:16:40 -0500 > From: Seth Milder <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Setting Roles > > Hi, > > I am wondering what I need to do to set roles for optional content when > using struts template tags as in > > <template:get name='administratorPanel' role="ADMINISTRATOR" /> > > Where and how can I set this role? I've googled it and looked through > the docs but I can only find how to check the role but not to set it. > > Thanks for any help with this. > You need to set up <security-constraint> elements in your web.xml file, and thus enable container managed login to the application. When the user is logged in, he or she is assigned a set of roles that the application can check by calling request.isUserInRole(), and that's what Struts does for you to enforce the "roles" attribute of a template or an action. > Seth Milder Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>