Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login Screen Customization

 
Kelly Dolan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic