[b]web.xml[/b]
[b]1[/b]. 如果要用到WebWork的最新特性并且不需要考虑向后兼容问题,您只需要在web.xml中添加一个单独的过滤器(如下);
<filter>
<filter-name>webwork</filter-name>
<filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
[b]2[/b]. 如果要用JSP的话,还需要一个添加标签库(如下);
<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/webwork.tld</taglib-location>
</taglib>
[b]Sitemesh[url=http://www.opensymphony.com/sitemesh/](SiteMesh Overview)[/url][/b]
"... WebWork把全部值栈数据都保存在请求attribute中, 这意味着如果想显示值栈(或ActionContext)中的数据, 只需使用WebWork附带的标准标签库 ..."
在WebWork的架构中, 标准的过滤器链(filter-chain)一般以 ActionContextCleanUp 开始, 后面跟着其他需要的过滤器. 最后, 由 FilterDispatcher 处理请求, 通常是将请求传递给ActionMapper. ActionContextCleanUp 的首要用途是为集成SiteMesh服务的. 他会通知FilterDispatcher在正确的时间清除请求. 否则, ActionContext将在SiteMesh修饰器访问数据之前被清除.
... ...
[b]1[/b]. 如果要用到WebWork的最新特性并且不需要考虑向后兼容问题,您只需要在web.xml中添加一个单独的过滤器(如下);
<filter>
<filter-name>webwork</filter-name>
<filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
[b]2[/b]. 如果要用JSP的话,还需要一个添加标签库(如下);
<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/webwork.tld</taglib-location>
</taglib>
[b]Sitemesh[url=http://www.opensymphony.com/sitemesh/](SiteMesh Overview)[/url][/b]
"... WebWork把全部值栈数据都保存在请求attribute中, 这意味着如果想显示值栈(或ActionContext)中的数据, 只需使用WebWork附带的标准标签库 ..."
在WebWork的架构中, 标准的过滤器链(filter-chain)一般以 ActionContextCleanUp 开始, 后面跟着其他需要的过滤器. 最后, 由 FilterDispatcher 处理请求, 通常是将请求传递给ActionMapper. ActionContextCleanUp 的首要用途是为集成SiteMesh服务的. 他会通知FilterDispatcher在正确的时间清除请求. 否则, ActionContext将在SiteMesh修饰器访问数据之前被清除.
... ...