毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> java技术 >> 正文

Unable to instantiate Action, testAction

更新时间:2015-12-12:  来源:毕业论文

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
testAction
Unable to instantiate Action, testAction, defined for 'test' in namespace '/'testAction
File: org/apache/catalina/loader/WebappClassLoader.java
Line number: 1,714
Stacktraces

Unable to instantiate Action, testAction, defined for 'test' in namespace '/'testAction
web.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name></display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

 

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext_*.xml classpath*/context/applicationContext_*.xml</param-value>
</context-param>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<session-config>
<session-timeout>180</session-timeout>
</session-config>
</web-app>
struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>


    <package name="default" namespace="/" extends="struts-default">

        <default-action-ref name="index" />

        <global-results>
            <result name="error">/error.jsp</result>
        </global-results>

        <global-exception-mappings>
            <exception-mapping exception="java.lang.Exception" result="error"/>
        </global-exception-mappings>

        <action name="index">
            <result>/index.jsp</result>
        </action>
       
        <action name="test" class="testAction" method="execute">
<result name="success">/test.jsp</result>
</action> -->
       
    </package>

    <!-- <include file="config/struts/*" /> -->

</struts>
实在不行,自己下载个struts的源代码,调试一下,断点设置在DefaultActionInvocation的setObjectFactory()里,这样就能看到为什么没有应用到Spring的ObjectFactory了。

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。