this is first time im using this forum
i m totally new to Struts and directly working on Struts2 w/o knowing much abt Struts .
so want some help
my prob is in my application
after login , based on user (like Admn/User/ etc..) i want to redirect to diffrent Actions
for Admin -- it should go to Loginaction with fullAdmin rights
for user --- it should go to another action with some rights and so on
settign permissions is another concern
but wht i want to know is how to redirect to seprate Actions.
i hope u get my point
so plz help if possible ASAP
for Admin -- it should go to Loginaction ...
why after login, users need to go to LoginAction again?
<action method='aAction' class="xxx" ...>
where admin, user, fail are String returned by aAction method in class xxx
result tag can add type="redirect", "redirectAction" etc...
You can't use a framework without understanding it. Go to the Struts site and go to Struts 2. It is *totally* different from Struts 1. They have a PDF book that describes Struts 2. Start by reading that.
Joining to mtyong. You are spiting your action in a couple actions. The first one validates login input and defines if the input correct and user is admin (action returns a string for the admin action) or a simple user (action returns a string for the user action).