0 Replies Latest reply on May 7, 2009 5:00 PM by knice147

    issues with seam navigation .. pages.xml

    knice147
      I am having two strange problem. 

      1. Whenever I access the login page directly and the authenticate method returns true, it sends me back to the login page with a "Login failed."  error message.  How could this happen if the authenticate method returns true?

      2. Whenever I type in the url in the following format for example, http://www.widget.com/application it keeps redirecting to the wrong location.  It seems as if it is ignoring my index.html page.  Is there anything in the pages.xml that could cause this.  Here is a snippet of my pages.xml:

      <code>
      <pages login-view-id="/login.xhtml"
      no-conversation-view-id="/pages/main.xhtml"
      xmlns="http://jboss.com/products/seam/pages"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd">
      <page login-required="true" view-id="/pages/*">
        <navigation>

      .....


      <exception class="org.jboss.seam.framework.EntityNotFoundException">
        <redirect view-id="/error.xhtml">
         <message severity="warn">Record not found</message>
        </redirect>
      </exception>
      <exception class="javax.persistence.EntityNotFoundException">
        <redirect view-id="/error.xhtml">
         <message severity="warn">Record not found</message>
        </redirect>
      </exception>
      <exception class="javax.persistence.EntityExistsException">
        <redirect view-id="/error.xhtml">
         <message severity="warn">Duplicate record</message>
        </redirect>
      </exception>
      <exception class="javax.persistence.OptimisticLockException">
        <end-conversation/>
        <redirect view-id="/error.xhtml">
         <message severity="warn">Another user changed the same data, please try again</message>
        </redirect>
      </exception>
      <exception class="org.jboss.seam.security.AuthorizationException">
        <redirect view-id="/error.xhtml">
         <message severity="error">You don't have permission to access this resource</message>
        </redirect>
      </exception>
      <exception class="org.jboss.seam.security.NotLoggedInException">
        <redirect view-id="/login.xhtml">
         <message severity="warn">#{messages['org.jboss.seam.NotLoggedIn']}</message>
        </redirect>
      </exception>
      <exception class="javax.faces.application.ViewExpiredException">
        <redirect view-id="/error.xhtml">
         <message severity="warn">Your session has timed out, please try again</message>
        </redirect>
      </exception>
      <exception class="org.jboss.seam.ConcurrentRequestTimeoutException">
        <http-error error-code="503"/>
      </exception>
      </code>