本帖最后由 dongdong5982 于 2014-2-18 09:40 编辑
今天刚看了一点struts的视频教程,当修改映射路径时,每次重启Tomcat服务器太过麻烦,就跟着视频里在struts.xml里加入了一行代码: - <constant name="struts.devMode" value="true" />
复制代码 意思是启动了开发者模式,这样的话,修改映射路径的话就可以即时响应,老师做的时候对了,不过我在做的时候,在页面时出现了错误,错误信息如下:
- Struts Problem Report
- Struts has detected an unhandled exception:
- Messages:
- There is no Action mapped for namespace [/] and action name [hello_struts] associated with context path [/Struts2_0100_Introduction].
- Stacktraces
- There is no Action mapped for namespace [/] and action name [hello_struts] associated with context path [/Struts2_0100_Introduction]. - [unknown location]
- com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
- org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
- org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
- com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
- org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
- org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
- org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
- org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
- org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
- org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
- org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
- org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
- org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
- org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
- org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
- org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
- org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
- org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
- java.lang.Thread.run(Thread.java:662)
-
- You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:
- struts.devMode=false
- in your WEB-INF/classes/struts.properties file.
复制代码
最后的意思应该是我启用了开始者模式吧,让我把它给关了,我是想开着它啊,如果关了的话,要不重新部署,要不重启服务器,这个问题怎么解决啊?向高手求教
|