Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Needed

 
visu Nekk
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Did u try this way?


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



Thanks,
Sudheer Yeu
 
onion ai
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
}
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look for information about isUserInRole method.
 
visu Nekk
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic