This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 14687
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help Needed
 
Similar Threads
Strange Problem
Clarifications
Having queries with one of the variables in Style tab
Is the Spring:Bind tag needed for display only data?
ejb 2