日期:2014-05-17  浏览次数:20723 次

struts2 指定class就会报错
如果我的配置文件这么写启动服务器没有没有问题
<package name="default" namespace="/" extends="struts-default">
        <action name="hello">
            <result name="success">
                /Hello.jsp
            </result>
        </action>
    </packag>
但是如果像下面,这么写就会有问题,IndexAction3这个类我也编好了,class指定的路径也正确,在路径下也能找到IndexAction3.class这个文件,不过一启动服务器就会提示错误
<constant name="struts.devMode" value="true" />
<package name="default" namespace="/" extends="struts-default">
        <action name="index" class="com.bjsxt.struts2.action.IndexAction3" >
            <result name="success">
                /ActionIntroduction.jsp
            </result>
        </action>
启动服务器就会提示错误的代码为
SEVERE: Exception starting filter struts2
Unable to load configuration. - action - file:/E:/Exceam/structs20300action/WebRoot/WEB-INF/classes/struts.xml:25:77
Caused by: Action class [com.bjsxt.struts2.action.IndexAction3] not found - action - file:/E:/Exceam/structs20300action/WebRoot/WEB-INF/classes/struts.xml:25:77
二月 18, 2014 11:06:32 上午 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
二月 18, 2014 11:06:32 上午 org.apache.catalina.core.StandardContext start
SEVERE: Context [/test] startup failed due to previous errors
二月 18, 2014 11:06:32 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/test] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@452fb4]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@3f09f4]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
二月 18, 2014 11:06:32 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/test] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@a68bf1]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@2da07a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
二月 18, 2014 11:06:32 上午 org.apache.catalina.startup.HostConfig deployDescriptor
------解决方案--------------------
  <action name="androidupdate_list" clas