0 Replies Latest reply on Aug 16, 2011 4:33 PM by shop it

    Cannot find target references . /home.xhtml etc in pages.xml

    shop it Newbie

      Hi,

      I am using SEAM 2.2. Please find the pages.xml below. All the *.xhtml pages are located under WEBCONTENT.

      After building the project it gives "Cannot find targeted resources for all : home.xhtml,error.xhtml,login.xhtml "

      Similar thing happens with login.pages.xml also.

       

      Pages.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="*" login-required="true">

              <navigation>

                  <rule if-outcome="home">

                      <redirect view-id="/home.xhtml"/>

                  </rule>

              </navigation>

          </page>

       

          <exception class="org.jboss.seam.framework.EntityNotFoundException">

              <redirect view-id="/error.xhtml">

                  <message>Not found</message>

              </redirect>

          </exception>

       

          <exception class="javax.persistence.EntityNotFoundException">

              <redirect view-id="/error.xhtml">

                  <message>Not found</message>

              </redirect>

          </exception>

       

          <exception class="javax.persistence.OptimisticLockException">

              <end-conversation/>

              <redirect view-id="/error.xhtml">

                  <message>Another user changed the same data, please try again</message>

              </redirect>

          </exception>

       

          <exception class="org.jboss.seam.security.AuthorizationException">

              <redirect>

                  <message>You don't have permission to access this feature</message>

              </redirect>

          </exception>

       

          <exception class="java.lang.Exception">

              <redirect view-id="/error.xhtml">

                  <message>Unexpected error, please try again or contact technical support</message>

              </redirect>

          </exception>

       

          <exception class="java.lang.IllegalArgumentException">

              <redirect view-id="/error.xhtml">

                  <message>Unexpected error, please try again or contact technical support</message>

              </redirect>

          </exception>

       

          <exception class="javax.el.ELException">

              <redirect view-id="/error.xhtml">

                  <message>Unexpected error, please try again or contact technical support</message>

              </redirect>

          </exception>

       

          <exception class="javax.servlet.ServletException">

              <redirect view-id="/error.xhtml">

                  <message>Unexpected error, please try again or contact technical support</message>

              </redirect>

          </exception>

       

          <exception class="org.jboss.seam.security.NotLoggedInException">

              <redirect view-id="/login.xhtml">

                  <message>Please, login using your user id and password</message>

              </redirect>

          </exception>

       

          <exception>

              <redirect view-id="/error.xhtml">

                  <message>Unexpected error, please try again or contact technical support</message>

              </redirect>

          </exception>

       

      </pages>

       

       

      Login.pages.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <page 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">

       

      <navigation from-action="#{identity.login}">

            <rule if="#{identity.loggedIn}">

               <redirect view-id="/home.xhtml"/>

            </rule>

         </navigation>

       

      </page>