org.apache.struts2.dispatcher.Dispatcher - Could not find action or result:

promise_LOVE IT  2015-09-01 12:19:54
149380 [http-bio-81-exec-3] WARN org.apache.struts2.dispatcher.Dispatcher - Could not find action or result: /Website/servlet/servletN
There is no Action mapped for action name servletN. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:554)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
下面是web的配置文件
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>ShowData</servlet-name>
<servlet-class>com.cn.data.ShowData</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>ShowData</servlet-name>
<url-pattern>/servlet/ShowData</url-pattern>
</servlet-mapping>
下面是jsp页面:
<form action="servlet/ShowData" method="post">
查询公司ID<input type="text" name="com_id" size="15"><br> <br>
<input type="submit" value="查询" />
</form>
问题的背景是通过jsp访问数据库的信息,并展现在页面上,项目的文件名是Website,在web上配置了相应的servlet,可是还是出问题,请各位大神指点。[/size][/size]
...全文
196 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
promise_LOVE 2015-09-07
最后问题自己解决啦,自己写了一个帖子,希望可以给其他人作为参考:[size=16px]struts2与srvlet并存[/size]
回复
Defonds 2015-09-01
你没有配 /Website/servlet/servletN 这个路径的 action?
回复
promise_LOVE 2015-09-01
引用 1 楼 defonds 的回复:
你没有配 /Website/servlet/servletN 这个路径的 action?
我配置的是/Website/servlet/ShowData的路径,刚刚那个可能是拷贝的时候出问题啦,不是/Website/servlet/servletN ,而是/Website/servlet/ShowData
回复
promise_LOVE 2015-09-01
我配置的是/Website/servlet/ShowData的路径,刚刚那个可能是拷贝的时候出问题啦,不是/Website/servlet/servletN ,而是/Website/servlet/ShowData
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2015-09-01 12:19
社区公告
暂无公告