Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Determining admin from general

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have an application where we have 2 types of users (general users & administrators).
I have a very similar kind of login page for both. The only difference is the header
portion which says General Login Page & Admin Login Page.

Now I want to achieve something like this when the request is a general request I
want to show General Login Page. For this I have set the home.jsp in my Welcome page.
This page redirects to a url like this action/GeneralAction whose url I have mapped
in the url-pattern section of my web.xml like this
<url-pattern>/action/*</url-pattern>

I am using FORM based authentication. So whenever from home.jsp the action gets called
the user is prompted with a Login.jsp which i have specified in the <login-config> tag.

Till this its fine.

But now I want to show the admin login page. How can i configure this.
Even if i have url pattern action specified in url-pattern say action/AdminAction
how can i force the admin login page to the Administrators & not the general login page.

I am using Weblogic7 (sp6)


Regards,
Manish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic