• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts application with user permission & role

 
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to access user info(permisson & role) in all the JSP pages so that certain operations(buttons/Link/Info) can be restricted based on the user. I am using framework struts1.2. Below are some of the option.

[1] Using Session
[2] Passing user info thru form-bean(but i am not able to get this in child window)
[3] Setting request in action & access in corresponding JSP(but need to get user details & set in request scope in all the action class. Looks redundant)

I would like to know the effective design to achieve this. Any suggestions would be highly appreciate.

Thanks
 
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In struts-config.xml file you can specify the roles. Every request is interpreted by RequestProcessor class. In the RequestProcessor class you will have processRoles() that takes request,response,ActionMapping as arguments. You can override this method to check the roles and permissions.

Thanks
BVR.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at the JEE tutorial. It has a chapter on Security in the Java EE Platform.
 
reply
    Bookmark Topic Watch Topic
  • New Topic