• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts Menu-Spring Security with roles adapter  RSS feed

maeve pla
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!