1 Reply Latest reply on Aug 5, 2011 9:27 AM by kwutzke

    My site not redirect login page

    katsumoto
      Hi,

      My problem is that I wrote domain name not redirect on login page. How to resolve this problem.

      For intance

      I write "http://localhost:8080/booking/" dont redirect login page *(want this)*

      I must write   "http://localhost:8080/booking/login.seam"

      My page.xml


      "

      <?xml version='1.0' encoding='UTF-8'?>
      <pages 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.2.xsd'
             no-conversation-view-id='/home.xhtml'
             login-view-id='/login.xhtml' >
         
          <page view-id='/chart/*' login-required='true' ></page>
          <page view-id='/core/*' login-required='true' ></page>
          <page view-id='/course/*' login-required='true' ></page>
          <page view-id='/event/*' login-required='true' ></page>
          <page view-id='/exam/*' login-required='true' ></page>
          <page view-id='/excell/*' login-required='true' ></page>
          <page view-id='/healthy/*' login-required='true' ></page>
          <page view-id='/js/*' login-required='true' ></page>
          <page view-id='/layout/*' login-required='true' ></page>
          <page view-id='/personel/*' login-required='true' ></page>
          <page view-id='/task/*' login-required='true' ></page>
          <page view-id='/transition/*' login-required='true' ></page>

          <page view-id='*' login-required='false'>
          <action execute='#{authenticator.setLocale('tr')}' on-postback='false' if='#{!authenticator.manage}'/> 
             <navigation>
                 <rule if-outcome='home'>
                     <redirect view-id='/home.xhtml'/>
                 </rule>
             </navigation>
             <navigation from-action='#{identity.logout}'>
                     <redirect view-id='/login.xhtml'/>
             </navigation>
         </page>

          <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='/login.xhtml'>
                  <message severity='warn'>Your session has timed out, please try again</message>
              </redirect>
          </exception>
         
          <exception class='org.jboss.seam.ConcurrentRequestTimeoutException' log-level='trace'>
            <http-error error-code='503' />
          </exception>
          
          <exception>
              <redirect view-id='/error.xhtml'>
                  <message severity='error'>Unexpected error, please try again</message>
              </redirect>
          </exception>
         
      </pages>



      "

      thanks alot
        • 1. Re: My site not redirect login page
          kwutzke

          Erm put an index.html into the web root?


          <html>
            <head>
              <title>...</title>
              <meta http-equiv="content-type" content="text/xhtml;charset=UTF-8">
              <meta http-equiv="refresh" content="0;url=login.seam">
            </head>
            <body>
            </body>
          </html>



          Karsten