Re: Redirect to the saved first requested url after loggin.

Splash Forums PrettyFaces Users Redirect to the saved first requested url after loggin. Re: Redirect to the saved first requested url after loggin.

#20936

Could you post the relevant parts of your web.xml?

Its working with this in my projects:

<filter>
<filter-name>AuthenticationFilter</filter-name>
<filter-class>com.example.webapp.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthenticationFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

<filter>
<filter-name>Pretty Filter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Pretty Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

If you are running in a Servlet 3.0 container make sure that the PrettyFaces filter is named exactly like this, because in this case your configuration will overwrite the configuration from the web-fragment.xml in the PrettyFaces archive.