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 Java 8 in Action this week in the Java 8 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Menu-Spring Security with roles adapter
 
Similar Threads
Struts menu jsp having problems if being processed after struts action
Adaption of roles in Struts menu not working
why sec:authorize doesn't work?
Trying to internationalize menu tabs using Struts-menu with struts 2
Element type "plug-in" must be declared.