Re: Spring security logout with prettyFaces

Splash Forums PrettyFaces Users Spring security logout with prettyFaces Re: Spring security logout with prettyFaces

#21610

What do you mean with “applicationContext”. Do you refer to the context path of your webapp or do you mean something different? I don’t know much about Spring Security, that’s why I’m asking?

If you refer to the context path of your application, you won’t have any problem, because the view-id from the PrettyFaces configuration is relative to the context path. So you don’t need to add the context path there.

If the applicationContext is something different you have to add to the logout URL, you could use dynaview. Take a look at this example:

<url-mapping id="logout">
<pattern value="/logout" />
<view-id value="#{logoutDynaviewBean.getViewId}" />
</url-mapping>

public class LogoutDynaviewBean {

public String getViewId() {

String applicationContext = ....;

return applicationContext + "/j_spring_security_logout";

}

}

I hope this helps! :)

Christian