• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Login Screen Customization

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic