This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts-menu Roles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-menu Roles" Watch "Struts-menu Roles" New topic
Author

Struts-menu Roles

Frank Bueckert
Greenhorn

Joined: Mar 23, 2006
Posts: 8
I've been bashing my head against this for most of the day. I think I've narrowed the problem down to a single line, but I have absolutely no idea on how to fix it. Documentation has a little bit of help, but not what I'm looking for.

Problem: Implementing security roles yanked out of a database. Specific to users. If I set permissions="rolesAdapter" in the useMenuDisplayer tag, nobody gets anything. I set permissions=<custom permission adapter> and everyone gets everything. Obviously, something wrong is happening.
Checking my roles, they get added to the user class properly.

Code:


This is basically yanked straight out of the permissions example. My problem is that menus turns up as null, no matter what I attempt to do. Why?

So, that is my problem. What am I doing wrong?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts-menu Roles