Login page in web.xml with parameters?

I have a jsf web application and in my web.xml I have this configuration:

<login-config>
  <auth-method>FORM</auth-method>
  <form-login-config>
   <form-login-page>/mainLoginPage.jsp</form-login-page>
   <form-error-page>/mainLoginPage.jsp?error=true</form-error-page>
  </form-login-config>
</login-config>

Well, everything works well for the url:

http://localhost:8080/mainLoginPage.jsp

But I would also like to add a url parameter for this mainLoginPage, for example:

http://localhost:8080/mainLoginPage.jsp?co=google

therefore, based on the user of the company, mainLoginPage will make a redix for VARIOUS login pages for different companies.

If I try the parameterized url above , this will not work, because it "thinks" that I am requesting another page and is not writing to it, redirects me to default login.jsp.

. web.xml, params mainLoginPage hardcoding -xml, ?

.

+5
1

web.xml. JSP, :

<!-- in, say, errorLoginPage.jsp -->
<jsp:forward page="/mainLoginPage.jsp?error=true" /></jsp:forward>
+1

All Articles