We have a generic JSF 1.1 (myfaces 1.1.4, tomahawk 1.1.9, uses "*.jsf" to map to jsp files) where we need a more flexible way to handle user logins. The basic issue is that the application as such does not know which backend the user needs to connect to, and that has until now been added as a parameter to the URL to the generic login page.
This has proven to be error prone, so I am investigating if we in addition to
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
can make a path mapping from "/login/*" so that we can have "/login/foo" and "/login/bar" as plain, robust URLs.
For this to work, I need to have them all map to the same underlying JSP file, which then must be able to identify if "foo" or "bar" was used so we can present backbone specific CSS attributes in the login page branding it accordingly. The environment specific information is located in a property file available to the login page.
I have read through the JSF 1.2 specification but it is a pretty big haystack and I didn't see the needle.
Can this be done in a standard way? (i.e. implementation independent) Can it be done if I upgrade to Mojarra with Tomahawk?
Am I missing something obvious?