In my JSF 2 I use form based authentication. The web.xml contains a single login.html entry.
<login-config>
<auth-method>FORM</auth-method>
<realm-name>testDB</realm-name>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/loginError.html</form-error-page>
</form-login-config>
</login-config>
The web app has a main page (/app/index.html) and a /app/mobile/index.html to support mobile phones.
I would like to use different layouts in login.html, based on the target URL.
if the target URL is /app/mobile/index.html, use a login page which is optimized for small browser sizes
otherwise use the default login page
The login page (login.html) page is a JSF page.
Is it possible to get the 'destination' page within the login page with JSF, maybe using information in the FacesContext?