2

I am using simple JSP pages for menu. There are diffrent menu for user and admin. Both menu contains different links. I am using tiles to integrate those menu to my forms.

Now, is there any advantages of using struts menu with spring security. Any tutorial, for integrating struts menu with spring?

Thank you in advance.

Sagar
  • 1,242
  • 7
  • 22
  • 49

2 Answers2

1

AppFuse, good example but not updated for long time.

In my experience, integration of Struts-Menu with Spring Security only can controlled the main menu, but it is enough for me.

For example

<menu:useMenuDisplayer name="Velocity" config="cssHorizontalMenu.min.vm">
  <security:authorize ifAnyGranted="${DoctorMenuRoles}">
      <menu:displayMenu name="DOCTOR" />
  </security:authorize>
  <security:authorize ifAnyGranted="${PatientMenuRoles}">
      <menu:displayMenu name="PATIENT" />
  </security:authorize>
  <security:authorize ifAnyGranted="${AdminMenuRoles}">
      <menu:displayMenu name="ADMIN" />
  </security:authorize>
</menu:useMenuDisplayer>

[DoctorMenuRoles] : Appear able & accessible for users with a role which is permitted.

lschin
  • 6,745
  • 2
  • 38
  • 52
0

For sure. Using spring-security you can not only show/hide parts of a JSP with somewhat called rol but also allow/disallow access based on a specified URL.

You have a lot of documentation at the spring security reference and at the article section of its site, but, for your purpose, you might want to have a look of the<sec:authorize> tag of the JSP tags.

Hope that helps!

kosmoplan
  • 487
  • 1
  • 3
  • 8
  • I know about Spring Security and that is implemented as well. I am looking for Struts menu advantages and more info on Integration of Struts menu and Spring security.(Sry, for confusing title) – Sagar Mar 02 '11 at 15:14