集成JSF时出现“无法从jsf-impl-2.0.jar中读取TLD META-INF / jsf_core.tld”错误
|
我们有一个Struts + Spring + Hibernate应用程序,我们正在尝试集成JSF。为此,我们在
web.xml
和struts-config.xml
中进行了一些配置。我加了一些
JAR文件保存为WEB-INF/lib
。
我的WEB-INF / lib中包含的jar文件在此处列出:
antlr-2.7.6rc1.jar,asm.jar,asm-attrs.jar,bsh-2.0b2.jar,c3p0-0.9.1.2-jdk1.3.jar,cglib-2.1.3.jar,commons-beanutils-1.7 .jar,commons-betwixt-0.8.jar,commons-cli-1.0.jar,commons-codec-1.3.jar,commons-collections-3.jar,commons-dbcp-1.2.1.jar,commons-digester-1.7 .jar,commons-discovery-0.2.jar,commons-fileupload.jar,commons-httpclient-3.1.jar,commons-io-1.3.1.jar,commons-lang-2.3.jar,commons-logging-1.1.jar ,commons-pool-1.2.jar,commons-validator.jar,connector-1_5.jar,dom4j-1.6.1.jar,ehcache-1.1.jar,el-api-6.0.20.jar,el-impl-2.2 .0-SNAPSHOT.jar,hibernate-3.1.3.jar,jetty-util-6.0.0,.jar,servlet-api-2.3.jar,spring-2.5.6.jar,standard.jar,struts.jar, xercesImpl-2.6.2.jar,xmlParserAPIs-2.6.2.jar,xstream-1.3.1
下面的jar文件是为集成JSF新添加的文件:
jsf-api-2.0.jar,jsf-impl-2.0.jar,myfaces-jsf-api-1.0.9.jar.jar.jar,struts-faces-1.3.10.jar
我的web.xml
是:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<web-app id=\"WebApp_ID\" version=\"2.4\"
xmlns=\"http://java.sun.com/xml/ns/j2ee\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\">
<display-name>SSHIntgr</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/config/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/config/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>locale</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- struts-faces configuration start -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- struts-faces configuration start -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<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>
我的ѭ1是
<struts-config>
<form-beans>
<form-bean name=\"usrForm\" type=\"com.sshi.web.form.UsrForm\" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action path=\"/login\" type=\"com.sshi.web.action.LoginAction\"
name=\"usrForm\" scope=\"request\">
<forward name=\"allowUser\" path=\"/pages/Welcome.jsp\"/>
<forward name=\"denyUser\" path=\"/index.jsp\"/>
</action>
</action-mappings>
<controller>
<set-property property=\"processorClass\"
value=\"org.apache.struts.faces.
application.FacesRequestProcessor\"/>
</controller>
<message-resources key=\"MessageResources\" parameter=\"MessageResources\" null=\"false\" />
<plug-in className=\"org.apache.struts.validator.ValidatorPlugIn\">
<set-property property=\"pathnames\"
value=\"/config/validator-rules.xml,/config/validation.xml\" />
<set-property property=\"stopOnFirstError\" value=\"true\" />
</plug-in>
</struts-config>
我正在使用Spring源收费套件,Tomcat 5.5和JDK 1.5。
我的Tomcat 5.5\\common\\lib
包含JAR文件
commons-el.jar,jasper-compiler.jar,jasper-compiler-jdt.jar,jasper-runtime.jar,jsp-api.jar,naming-factory.jar,naming-factory-dbcp.jar,
naming-resources.jar,servlet-api.jar
我的服务器正常启动,但是无法加载JSP页面,我收到了异常
org.apache.jasper.JasperException: Unable to read TLD \"META-INF/jsf_core.tld\" from JAR file \"file:/SSHIntgr/WEB-INF/lib/jsf-impl-2.0.jar\": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: com.sun.faces.taglib.jsf_core.CoreValidator
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:179)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
我该如何解决?
没有找到相关结果
已邀请:
1 个回复
土投