struts2的错误:严重:
Error filterStart我是照着视频教程做的,基本一样
我的是MyEclipse5.5,tomcat5.0,jdk1.5
网上教程是MyEclipse6.0,tomcat6.0,jdk1.5
错误如下:
2009-8-29 18:18:17 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-8-29 18:18:17 org.apache.catalina.core.StandardContext start
严重:
Context startup failed due to previous errors2009-8-29 18:18:22 org.apache.commons.digester.Digester endElement
严重: End event threw exception
2009-8-29 18:18:22 org.apache.catalina.startup.HostConfig deployDescriptors
严重: Error deploying configuration descriptor truts2.xml
web.xml
XML code
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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">
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
struts.xml:
XML code
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="struts2" extends="struts-default">
<action name="login" class="com.test.action.LoginAction">
<result name="success">/result.jsp</result>
</action>
</package>
</struts>
------解决方案--------------------估计是包引用的事情
在apache网站下载下来的包可能有问题
你找个能运行的例子,把你现在对应的lib下的包换下
------解决方案--------------------我以前也遇到过类似的问题,好像是你加的驱动包和tomcat里的驱动包有冲突吧
要卸载掉tomcat里的驱动包程序就运行正常了,具体卸哪个忘了,你网上搜一下
------解决方案--------------------tomcat下面配置工程的那个truts2.xml文件里面有问题
------解决方案--------------------错误原因:
认为是由于jdk1.5 与 tomcat5.0之间的关于 TransformerFactoryImpl 类的冲突造成的。
tomcat-5.0.28\common\endorsed下有两个jar包:xercesImpl.jar和xml-apis.jar,其中的类 javax.xml.transform.TransformerFactory 与jdk1.5中的类org.apache.xalan.processor.TransformerFactoryImpl其实是同一个类。
in tomcat java is called with the following argument:
-Djava.endorsed.dirs="X:\my_app\Portal\tomcat\common\endorsed"
In this directory you find two jar files: xercesImpl.jar and xml-apis.jar needed by tomcat and that must be loaded before all xmsl stuff present in the jdk (1.4 naming problem). And in the file xml-apis.jar the TransformerFactoryImpl is set to "org.apache.xalan.processor.TransformerFactoryImpl".
解决办法:
1. 将xml-apis.jar移出endorsed文件夹。
2. 用xalan系列jar包替换原来的xercesImpl.jar和xml-apis.jar。
xalan系列jar包:serializer.jar、xalan.jar、xercesImpl.jar和xml-apis.jar。
3. For other application, just check this file or dom3-xml-apis.jar in your class path.
如果你不会这样做,就使用1.4的JDK和tomcat5.0
或者JDK1.5 tomcat5.5 这2种类型才是匹配的