求教:webwork配置问题

08-07-20 rk1982

初用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>

freebox
2008-07-20 18:21

Unable to find interceptor class referenced by ref-name defaultStack

找不到名为defaultStack的拦截器,查文档看看是不是在某次重构时改名了,以前我用lucene常碰上改名这事。