我的tomcat是5.0.30,跑struts 1.2 的程序,后太报错:
严重: Begin event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyU
tilsBean.java:1773)
严重: Parsing error processing resource path /WEB-INF/struts-config.xml
java.lang.reflect.InvocationTargetException
at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2792)
at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2818)
at org.apache.commons.digester.Digester.startElement(Digester.java:1289)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
e)
我的struts-config.xml是:
<?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN " "http://struts.apache.org/dtds/struts-config_1_2.dtd ">
<struts-config>
<data-sources />
<form-beans >
<form-bean name= "createNumberForm " type= "com.yourcompany.struts.form.CreateNumberForm " />
<form-bean name= "judgeForm " type= "com.yourcompany.struts.form.JudgeForm " />
</form-beans>
<global-exceptions />
<action-mappings >
<action
attribute= "createNumberForm "
input= "/form/guess.jsp "
name= "createNumberForm "
path= "/createNumber "
type= "com.yourcompany.struts.action.CreateNumberAction ">
<forward name= "guess " path= "/guess.jsp " />
</action>
<action
attribute= "judgeForm "