This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes how to differentiate admin and user module in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to differentiate admin and user module in struts2" Watch "how to differentiate admin and user module in struts2" New topic
Author

how to differentiate admin and user module in struts2

phani yelugula
Greenhorn

Joined: Oct 19, 2012
Posts: 1
im new to struts,
in my project im having 2 modules(admin,user)
"admin" is having different operations like adding users,removing users,adding items,removing users
and
"user" is having operations like ordering items,checking his account balance....
now i wanna differentiate user pages and admin pages (ie if admin is logged i wanna provide him admin module,,,if user is logged i wanna provide him pages like ordering items,checking his account balance....)

i got to know abt switchaction can be used in this senario but i dont have any examples in net how to use switchaction in struts2(but im havng switchaction examples in struts 1.2 from google)
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Have a look at The Java Enterpirse Edition, Working with Realms, Users, Groups, and Roles. There are also alternatives like Spring Security.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi,

Simple solu can be define role in database and assign the role to user.

Regards
Jatan
 
wood burning stoves
 
subject: how to differentiate admin and user module in struts2
 
Similar Threads
Session Management problem in Struts
Get session object from session id
Maintaining Session
Site navigation quesiton using IBM RAD 7.5
session ID