`

黑马程序员:HTTP Status 404 - /MyClinic_010paitent/showAllPatient.action

 
阅读更多
------- android培训 java培训、期待与您交流!-------



错误页面:
HTTP Status 404 - /MyClinic_010paitent/showAllPatient.action

type Status report

message /MyClinic_010paitent/showAllPatient.action

description The requested resource (/MyClinic_010paitent/showAllPatient.action) is not available.
Apache Tomcat/7.0.27

检查后发现,原本代码:
	<package name="patient" extends="struts-default" namespace="/patient">
		<action name="ShowAllPatient" class="com.clinic.action.ShowAllPatientAction">
			
			<result name="success">/patient/patient-showAllPatient.jsp</result>
		</action>

		<action name="*-*" class="com.clinic.action.{1}Action" method="{2}">
			<result name="success" type="redirect">/patient/ShowAllPatient.action</result>
			<result name="showPatient">/patient/patient-showPatient.jsp</result>
			<result name="error">/add.jsp</result>
			
		</action>
	</package>


里边的action名用了大写开头,这个错误容易犯,需要留心了
修改为:
	<package name="patient" extends="struts-default" namespace="/patient">
		<action name="showAllPatient" class="com.clinic.action.ShowAllPatientAction">
			
			<result name="success">/patient/patient-showAllPatient.jsp</result>
		</action>

		<action name="*-*" class="com.clinic.action.{1}Action" method="{2}">
			<result name="success" type="redirect">/patient/showAllPatient.action</result>
			<result name="showPatient">/patient/patient-showPatient.jsp</result>
			<result name="error">/add.jsp</result>
			
		</action>
	</package>


继续发现错误:
HTTP Status 404 - There is no Action mapped for action name showAllPatient.

type Status report

message There is no Action mapped for action name showAllPatient.

description The requested resource (There is no Action mapped for action name showAllPatient.) is not available.

发现原来是url地址的大写又写错了
	<package name="patient" extends="struts-default" namespace="/patient">
		<action name="showAllPatient" class="com.clinic.action.ShowAllPatientAction">
			
			<result name="success">/patient/Patient-showAllPatient.jsp</result>
		</action>

		<action name="*-*" class="com.clinic.action.{1}Action" method="{2}">
			<result name="success" type="redirect">/patient/showAllPatient.action</result>
			<result name="showPatient">/patient/patient-showPatient.jsp</result>
			<result name="error">/add.jsp</result>
			
		</action>
	</package>


最后终于解决,注意,要么地址打错了,要么大小写弄错了

类似的:
18:32:56,785  WARN org.apache.struts2.dispatcher.Dispatcher:60 - Could not find action or result
There is no Action mapped for action name showAllPatient. - [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:39)
	at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
18:33:00,827  WARN org.apache.struts2.dispatcher.Dispatcher:60 - Could not find action or result
There is no Action mapped for action name showAllPatient. - [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:39)
	at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
18:33:22,355  WARN org.apache.struts2.dispatcher.Dispatcher:60 - Could not find action or result
There is no Action mapped for action name showAllPatient. - [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:39)
	at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:500)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)


也是大小写弄错了的问题,导致没办法指向正确的action


------- android培训 java培训、期待与您交流!-------


详细请查看:http://edu.csdn.net/heima -------

分享到:
评论

相关推荐

    HTTP_Status_404的几种解决方案

    "HTTP_Status_404解决方案详解" HTTP Status 404是指客户端向服务器请求资源时,服务器无法找到该资源,从而返回的状态码。这个错误码可能会因为多种原因引起,以下是 several 解决方案: 一、未部署Web应用 解决...

    InsightSphinxExamples-5.0.0.zip

    $ ./Utilities/SetupForDevelopment.sh .. _Breathe: https://github.com/michaeljones/breathe .. _build instructions in the documentation: https://itk.org/ITKExamples/Documentation/Build/index.html .. _...

    squid-3.5.20-17.el7_9.5.x86_64.rpm

    官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装

    Android代码-crate

    image:: https://dev.azure.com/cratedb/cratedb/_apis/build/status/crate.crate :target: https://dev.azure.com/cratedb/cratedb/_build/latest?definitionId=1 .. image:: ...

    Webtest(jsp).rar_Java ODBC SQLSERVER_http/2-class.com/_jsp_试卷_选择

    (4)出试卷路径为 http://localhost:8080/chap22/chujuan.jsp 如果放在根目录,则路径和书上的界面一样。 (5)选择题路径为 http://localhost:8080/chap22/xuanzeti.jsp (6)判断题路径为 ...

    nginx实现ssl之https改造(包含单机版以及负载均衡配置)

    模块 --with-http_gzip_static_module --with-openssl=/opt/soft/openssl-1.1.1g 更改为 ./configure --prefix=/usr/local/nginx --with-... 重新编译并安装make && make install6. 创建软链接ln -s /usr/local/nginx/...

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. ...

    boostdesc_bgm.i,vgg_generated_48.i等.zip

    CMake配置生成opencv4的时候,... - http_proxy/https_proxy - and/or HTTP_PROXY/HTTPS_PROXY 可以下载本资源结合我的博文(https://editor.csdn.net/md/?articleId=121682921)进行配置就可以顺利成功解决问题了。

    HTTP_Status_404(The_requested_resource_is_not_available)的几种解决方案_补充

    HTTP Status 404 解决方案总结 HTTP Status 404 是一个常见的错误代码,它表示请求的资源不可用。在本文中,我们将讨论七种常见的解决方案,以帮助开发者快速解决该问题。 1. 未部署 Web 应用 如果您遇到了 HTTP ...

    Nginx RPM 包定制制作

    ./configure --prefix=/application/nginx-1.6.3 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module make make install ln -s /application/nginx-1.6.3/ /application/nginx...

    # jquery.cookie ![Build Status](https://travis-ci.org/carhartl/

    [Build Status](https://travis-ci.org/carhartl/jquery-cookie.png?branch=master)](https://travis-ci.org/carhartl/jquery-cookie) A simple, lightweight jQuery plugin for reading, writing and deleting ...

    Redhat 使用CentOS的yum源进行升级或软件安装

    # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # #...

    clickhouse离线安装包

    亲自安装有效,下载可以直接使用 centos7下clickhouse离线下载包: clickhouse:server安装 ...查看状态systemctl status clickhouse-server.service 安装后: 配置文件:/etc/clickhouse-server/con

    libtensorflow-cpu-linux-x86_64-2.4.0.tar.gz

    这些头文件允许程序员在C或C++环境中集成TensorFlow的功能。 4. **lib**:这个目录包含了用于链接TensorFlow库的动态链接库文件(.so文件)。在Linux环境下,这些文件是运行TensorFlow程序所必需的,因为它们包含了...

    docker快速构建disconf镜像

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES de596887acac conf_nginx:0.0.1 "nginx -g 'daemon ..." About an hour ago Up About an hour 0.0.0.0:80-&gt;80/tcp dockerdisconfmaster_disconf_nginx_1 5...

    Android代码-roaster

    image:https://travis-ci.org/forge/roaster.svg?branch=master["Build Status", link="https://travis-ci.org/forge/roaster"] image:http://img.shields.io/:license-EPL-blue.svg["License", link=...

    CollabNetSubversion-client-1.7.3-2.x86_64.rpm [注意这是 64 位的]

    [root@centos bin]# svn status -q / svn: E155036: 请参阅命令 'svn upgrade' svn: E155036: 工作副本 '/' 格式太旧 (格式 10, Subversion 1.6 创建) 升级 svn 1.6 工作库格式 [root@centos bin]# svn upgrade / ...

    Freeswitch集成科大讯飞及百度语音服务.docx

    「Freeswitch集成科大...sofia status ``` 本文中,我们介绍了 Freeswitch 的安装、配置和集成科大讯飞和百度语音服务的过程。通过这些步骤,可以实现语音识别、合成和语音服务等功能,为用户提供更加完善的通信体验。

    Snipaste_2020-05-20_18-18-38.png

    这是因为缺失了某个文件,直接到eve-ng的官网下载https://repo.eve-ng.cn/tool/EVE-NG-Win-Client-Pack.exe点击下载的文件一顿默认操作再点击,然后就消失了

    zeroboard.beta.0.0.3简体中文版

    zb5.beta.0.0.3简体中文版 安装环境: - php 4.x 版本以上 - mysql 4.1 版本以上 - iconv 支持 - gd library 支持 - php 设置 session.auto_start = ...plugins/site_status/theme/default/site_status.tpl

Global site tag (gtag.js) - Google Analytics