This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android 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: 9126
    
    9

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

[How To Ask Questions On JavaRanch]
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 297

Hi,

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

Regards
Jatan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to differentiate admin and user module in struts2
 
It's not a secret anymore!