title: This webpage has a redirect loop error after opened any page of seam application in jboss AS 7.1
body: <p>My project is using seam 2.2.2 Final, and the application server is Jboss 7.1. After a long deployment process, finally I can deploy it successfully. But when I attempt to open it in the  browser, I get error like this:</p>
  
  <blockquote>
    <p>"This webpage has a redirect loop</p>
    
    <p>The webpage at "http://localhost:8080/integration/debug.seam?cid=2" has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer." .</p>
  </blockquote>
  
  <p>How can I solve this problem?</p>
  
  <p>This is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;integration&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.seam&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;org.jboss.jbossfaces.JSF_CONFIG_NAME&lt;/param-name&gt;
      &lt;param-value&gt;Mojarra-1.2&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;
      &lt;param-value&gt;blueSky&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;org.jboss.seam.servlet.SeamListener&lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;Seam Filter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.jboss.seam.servlet.SeamFilter&lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;Seam Filter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Seam Resource Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.jboss.seam.servlet.SeamResourceServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Seam Resource Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/seam/resource/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;facelets.DEVELOPMENT&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
      &lt;param-value&gt;.xhtml&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;security-constraint&gt;
      &lt;display-name&gt;Restrict raw XHTML Documents&lt;/display-name&gt;
      &lt;web-resource-collection&gt;
        &lt;web-resource-name&gt;XHTML&lt;/web-resource-name&gt;
        &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;auth-constraint/&gt;
    &lt;/security-constraint&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is my persistence.xml. I think configuration of persistence.xml is correct.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Persistence deployment descriptor for dev profile --&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
               version="1.0"&gt;
  
     &lt;persistence-unit name="integration" transaction-type="JTA"&gt;
        &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
        &lt;jta-data-source&gt;java:jboss/integrationDSJNDI&lt;/jta-data-source&gt;
        &lt;properties&gt;
           &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/&gt;
           &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt;
           &lt;property name="hibernate.show_sql" value="true"/&gt;
           &lt;property name="hibernate.format_sql" value="true"/&gt;
           &lt;property name="jboss.entity.manager.factory.jndi.name" value="java:/integrationEntityManagerFactory"/&gt;
        &lt;/properties&gt;
     &lt;/persistence-unit&gt;
  
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Jar list</p>
  
  <pre><code>antlr-2.7.6.jar
  antlr-runtime-3.1.1.jar
  commons-beanutils-1.7.0.jar
  commons-collections-3.2.jar
  commons-digester-1.8.jar
  commons-logging-1.0.4.jar
  dom4j-1.6.1.jar
  drools-api-5.0.1.jar
  drools-core-5.0.1.jar
  gwt-servlet-2.3.0.jar
  hibernate-core-3.3.0.SP1.jar
  hibernate-validator-3.1.0.GA.jar
  drools-compiler-5.0.1.jar
  itext-2.1.2.jar
  itext-rtf-2.1.2.jar
  jboss-el-1.0_02.CR5.jar
  jboss-seam-2.2.1.Final.jar
  jboss-seam-debug-2.2.1.Final.jar
  jboss-seam-ioc-2.2.1.Final.jar
  jboss-seam-jul-2.2.1.Final.jar
  jboss-seam-mail-2.2.1.Final.jar
  jboss-seam-pdf-2.2.1.Final.jar
  jboss-seam-remoting-2.2.1.Final.jar
  jboss-seam-ui-2.2.1.Final.jar
  jbpm-jpdl-3.2.2.jar
  json-20080701.jar
  jta-1.1.jar
  mvel2-2.0.10.jar
  richfaces-api-3.3.3.Final.jar
  richfaces-impl-3.3.3.Final.jar
  richfaces-ui-3.3.3.Final.jar
  xml-apis-1.0.b2.jar
  xstream-1.3.1.jar
  </code></pre>