File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts Menu-Spring Security with roles adapter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Menu-Spring Security with roles adapter" Watch "Struts Menu-Spring Security with roles adapter" New topic

Struts Menu-Spring Security with roles adapter

maeve pla

Joined: Oct 12, 2010
Posts: 1
hi, im using struts menu and apply security on it. in the main menu, i used the spring security tag, but i cant use the spring security tag in the menu items since definition of the menu items should be done in the xml file.

it is said to use roles adapter, but i can't make it work or rather adding roles permission is not working. without the roles permission, menus are rendered properly.

my menu-config.xml code:
<Displayer name="Velocity"
type="net.sf.navigator.displayer.VelocityMenuDisplayer" />

<Menu name="Admin" title="menu.admin" >
<Item name="Item1" title="menu.item1" page="/adminItem1.html" roles="ROLE_Admin">

my jsp code:
<menu:useMenuDisplayer name="Velocity" config="displayMenu.vm" permissions="rolesAdapter">
<sec:authorize ifAnyGranted="ROLE_SysadminUser">
<menu:displayMenu name="Admin" />

i have a displayMenu.vm code

and i add the following code in web.xml

are there any configurations that need to be done? i really need some enlightenment on this.
thank you so much in advance.
I agree. Here's the link:
subject: Struts Menu-Spring Security with roles adapter
jQuery in Action, 3rd edition