Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to differentiate admin and user module in struts2  RSS feed

 
phani yelugula
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9406
12
Linux Mac OS X Windows
 
jatan bhavsar
Ranch Hand
Posts: 299
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Regards
Jatan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!