File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 8867
    
    8

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to differentiate admin and user module in struts2