File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Login Screen Customization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Login Screen Customization" Watch "Login Screen Customization" New topic
Author

Login Screen Customization

Kelly Dolan
Ranch Hand

Joined: Jan 08, 2002
Posts: 109
I use form based authentication with my servlets (i.e., I specify <form-login-page>/login.jsp</form-login-page> . I have set up two sites in my deployment descriptor (ex. /siteA and /siteB). Depending on what site I go to I need my login page to look different.
The deployment descriptor specification does not allow me to specify different login pages per site. Therefore, is there a way in this JSP to know which site initiated the login?
Much appreciated!
- Kelly
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Do you mean they are all running under the same web-context, and siteA and siteB are just sirectories in that context, or are siteA and siteB separate web applications (ie different contexts)?
If they are separate contexts, there should be a separate /login.jsp for each application.
Otherwise you'll have to find out how your application srever is remembering the initial requested page, and parse that url to find whether it's siteA or siteB. Sometimes it's on a cookie, sometimes its on the session. You'll just have to go and look.
Dave
 
Consider Paul's rocket mass heater.
 
subject: Login Screen Customization