[jboss-user] [JBoss Seam] - @Restrict and redirect.captureCurrentView

fmeystre do-not-reply at jboss.com
Thu Sep 13 07:08:30 EDT 2007

I try to  use the built-in security handling to redirect user to the page she originally requested after the login.

I works fine when I'm using login-required="true" in pages.xml but the problem is when I'm using @Restrict("#{identity.loggedIn}") in the class. When the annotations is used, the login page is shown but after login the page is reloaded (instead of the originally requested). And on the JBoss Console I can see an Exception: javax.faces.el.EvaluationException: Exception while invoking expression #{commandeService.commander} ...........  Caused by: org.jboss.seam.security.NotLoggedInException

I'm doing something wrong ?

here is my files :

pages.xml :
 <pages no-conversation-view-id="/home.xhtml"
	 <page view-id="*">
	    	<navigation from-action="#{commandeService.commander(panier)}">
	    		<redirect view-id="/commande.xhtml">
	<page view-id="/commande.xhtml" login-required="true">
        <redirect view-id="/login.xhtml">






Java class, session bean with restricted method/class:


public class CommandeServiceBean implements CommandeService{

	private User user;
	private EntityManager em;

	public void commander(Panier panier) throws PoidsMaxException, NotLoggedInException {

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083871#4083871

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083871

More information about the jboss-user mailing list