- huanghero0663
- 等级: 初级会员
- 文章: 25
- 积分: 30
|
请教大家一个问题,我在整合使用spring+jsf 的时候出错了,下面是tomcat日记得出错提示(我觉得有用的内容):
2007-04-03 17:40:19 StandardContext[/test1]Exception sending context
initialized event to listener instance of class
com.sun.faces.config.ConfigureListener
javax.faces.FacesException: Can't parse configuration file:/WEB-INF/
faces-config.xml
Caused by: java.net.ConnectException: Connection timed out: connect
我的想法就是spring在加载jsf 的配置文件的时候出现错误,然而事实上,我的faces-config文件并没有其他的内容,因为我
的bean-manage文件和导航文件都在其他的文件中。下面是我的-facesconfig源代码:
faces_config.xml 代码
- <?xml version='1.0' encoding='UTF-8'?>
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-
- <!-- =========== FULL CONFIGURATION FILE
- ================================== -->
-
-
- <faces-config>
-
-
- <application>
- <locale-config>
- <default-locale>zh</default-locale>
- <supported-locale>en</supported-locale>
- <supported-locale>zh</supported-locale>
- </locale-config>
- <message-bundle>messages</message-bundle>
- </application>
-
-
- </faces-config>
-
web.xml 代码
- <?xml version="1.0" encoding="UTF-8"?>
-
- <!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
- <web-app>
- <display-name>Library Management Application</display-name>
-
-
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
-
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>
- /WEB-INF/faces-config.xml,
- /WEB-INF/faces-managed-beans.xml,
- /WEB-INF/faces-navigation.xml
- </param-value>
- </context-param>
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/applicationContext.xml</param-value>
- </context-param>
-
- <filter>
- <filter-name>hibernateFilter</filter-name>
- <filter-class>
- org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
- </filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>hibernateFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
- <listener>
- <listener-class>
- com.sun.faces.config.ConfigureListener
- </listener-class>
- </listener>
-
- <listener>
- <listener-class>
- org.springframework.web.context.ContextLoaderListener
- </listener-class>
- </listener>
-
-
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
-
- <servlet>
- <servlet-name>SpringContextServlet</servlet-name>
- <servlet-class>
- org.springframework.web.context.ContextLoaderServlet
- </servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.faces</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
- </web-app>
请遇到过类似问题的同志可以,在此先谢过了!:)
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|
返回顶楼 |
|
|
- yujiang
- 等级: 初级会员
- 性别:
- 文章: 49
- 积分: 52
- 来自: 杭州
|
没有遇到过,
不过你写了验证XML看看是不是
http://java.sun.com/dtd/web-facesconfig_1_1.dtd这个
连接不上.
|
返回顶楼 |
|
|