Reply To: [Solved] PrettyFaces & JAAS problem

Splash Forums PrettyFaces Users [Solved] PrettyFaces & JAAS problem Reply To: [Solved] PrettyFaces & JAAS problem



Yeah! I found a solution. It’s pretty simple.

Let’s say you have the following prettyface mappings which you want to work BEFORE you have authenticated with JAAS:

	<url-mapping id="login">
		<pattern value="/login/#{login}/#{pass}" />
		<view-id value="/login.xhtml" />

	<url-mapping id="loginError">
		<pattern value="/loginerror" />
		<view-id value="/login.xhtml?HasError=true" />

To make this work you just add it to the unprotected area:

			<web-resource-name>Unprotected Area</web-resource-name>

Note that if you have parameters (as I have in the first rule) you have to add “/*” to the url pattern and if it’s just a prettyurl without paramters, you don’t have too 🙂