求教:webwork配置問題

rk1982發表於2008-07-20
初用webwork,配置完畢後,執行jsp頁面,只做了一個text表單的提交,但提交後,console報出如下問題:嚴重: Unable to load class com.opensymphony.xwork.spring.interceptor.ActionAutowiringInterceptor for interceptor name autowiring. This interceptor will not be available.
Cause: Could not load class com.opensymphony.xwork.spring.interceptor.ActionAutowiringInterceptor. Perhaps it exists but certain dependencies are not available?
2008-7-20 7:47:10 com.opensymphony.xwork.config.providers.InterceptorBuilder constructInterceptorReference
嚴重: Unable to find interceptor class referenced by ref-name defaultStack
2008-7-20 7:47:10 com.opensymphony.xwork.config.providers.InterceptorBuilder constructInterceptorReference
嚴重: Unable to find interceptor class referenced by ref-name defaultStack

隨後我檢視了一下web.xml和寫好的xwork.xml檔案,實在找不出原因何在,請教各位,兩檔案配置如下:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>
<servlet-name>webwork</servlet-name>
<servlet-class>
com.opensymphony.webwork.dispatcher.ServletDispatcher
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>webwork</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/webwork.tld</taglib-location>
</taglib>
</web-app>




xwork.xml:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-1.0.dtd">

<xwork>

<include file="webwork-default.xml"></include>


<package name="test" extends="webwork-default">

<action name="hello" class="com.dnasell.test.HelloWorld">
<result name="success" type="dispatcher">/hello.jsp</result>
<result name="input" type="dispatcher">/index.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
</package>
</xwork>

相關文章