File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Determining admin from general Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Determining admin from general" Watch "Determining admin from general" New topic

Determining admin from general

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312

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

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)

I agree. Here's the link:
subject: Determining admin from general
jQuery in Action, 3rd edition