GeeCON Prague 2014*
The moose likes Servlets and the fly likes Help Needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Help Needed" Watch "Help Needed" New topic
Author

Help Needed

visu Nekk
Ranch Hand

Joined: Sep 06, 2005
Posts: 122
Hi,
I need to design an application such that when a user logs in,a separate screen should appear as per the role played by the user.Please guide me how to do this using servlets and jsp.
Thanx in advance.
Regards,
Visu
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
Hi

Did u try this way?


if(user=='A'){
response.sendRedirect(//login path..);
}
else if(user=='B'){
response.sendRedirect(//login path..);
}



Thanks,
Sudheer Yeu


A Moment's insight is sometimes worth a Life's experience.
onion ai
Greenhorn

Joined: Jan 09, 2006
Posts: 4
u could use integer presents the role of users.
for example, 1 user,2 moderator,3 administator,etc.

in the servlet,u could try this
switch(user_role)
{
case 1:resposnse.sendRedirect("//user.jsp");break;
case 2:resposnse.sendRedirect("//moderator.jsp");break;
case 3:resposnse.sendRedirect("//admin.jsp");break;
}


I love xiaoxiao
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Look for information about isUserInRole method.


[My Blog]
All roads lead to JavaRanch
visu Nekk
Ranch Hand

Joined: Sep 06, 2005
Posts: 122
Thanks for all of ur guidance.Now I have got an idea of how to start with.

Regards,
Visu
 
GeeCON Prague 2014
 
subject: Help Needed