aspose file tools*
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


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Menu-Spring Security with roles adapter" Watch "Struts Menu-Spring Security with roles adapter" New topic
Author

Struts Menu-Spring Security with roles adapter

maeve pla
Greenhorn

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:
<MenuConfig>
<Displayers>
<Displayer name="Velocity"
type="net.sf.navigator.displayer.VelocityMenuDisplayer" />
</Displayers>
<Menus>

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


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


i have a displayMenu.vm code

and i add the following code in web.xml
<listener>
<listener-class>net.sf.navigator.menu.MenuContextListener</listener-class>
</listener>


are there any configurations that need to be done? i really need some enlightenment on this.
thank you so much in advance.
 
jQuery in Action, 2nd edition
 
subject: Struts Menu-Spring Security with roles adapter