讨论:struts2.0 配置文件的包含继承--便于分模块开发
使用struts2.0的包含继承,我们可以分模块开发;但是我在其配置是出现了问题:
?
总的配置文件
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constant name="struts.i18n.encoding" value="UTF-8"></constant><constant name="struts-objectFactory" value="spring"></constant><!-- 引用模块的配置文件 --><include file="com/kevin/configs/struts/struts_*.xml"></include></struts>
?
?
模块配置文件
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts><package name="com.web.actions.student" extends="struts-default" namespace="/"><action name="index" name="code">There is no Action mapped for namespace / and action name index. - [unknown location]at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)at java.lang.Thread.run(Unknown Source)
?
?
?
还请各位帮忙呀!!!! 我是学struts2.0+hibernate+spring+dwr的工程师,qq为631218255,希望与各位成为技术上的朋友!