This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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