我的项目使用的是seam 2.2.2 Final,应用服务器是Jboss 7.1。经过漫长的部署过程,终于可以部署成功了。但是当我尝试在浏览器中打开它时,我收到如下错误:
“此网页有重定向循环
“http://localhost:8080/integration/debug.seam?cid=2”的网页导致了过多的重定向。清除此站点的 cookie 或允许第三方 cookie 可能会解决问题。如果不是,则可能是服务器配置问题,而不是您的计算机问题。”。
我怎么解决这个问题?
这是我的 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<display-name>integration</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
<context-param>
<param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
<param-value>Mojarra-1.2</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<security-constraint>
<display-name>Restrict raw XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
</web-app>
这是我的persistence.xml。我认为persistence.xml 的配置是正确的。
<?xml version="1.0" encoding="UTF-8"?>
<!-- Persistence deployment descriptor for dev profile -->
<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">
<persistence-unit name="integration" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/integrationDSJNDI</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/integrationEntityManagerFactory"/>
</properties>
</persistence-unit>
</persistence>
罐子清单
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