is not available处理|The requested resource
来源:人文屋 本文已影响3.07W人
来源:人文屋 本文已影响3.07W人
逐一排查与处理:
HTTP Status 404(The requested resource is not available)异常主要是路径错误或拼写错误造成的,请按以下步骤逐一排查:
1.未部署web应用
2.URL输入错误
a.查看URL的IP地址和端口号是否书写正确。
b.查看上下文路径是否正确 Project——Properties——MyElipse——Web——Web Context-root检查这个路径名称是否书写正确。
c.检查一下文件名称是否书写正确。
3.目录不能被引用
在 Eclipse的“包资源管理器(Package Explorer)”检查文件存放的位置。由于META-INF WEB-INF文件夹下的内容无法对外发布,所以,如果你引用了带这两个目录的文件,肯定是不允许。
例如: http://localhost:8080/guestbook/WEB-INF/index.html就是错误的,文件位置存放错误。
4. Tomcat服务器中web.xml中的问题
如果你的web应用程序有多个jsp页面的话,当你点击你web应用程序的虚拟根目录时可能会出现404错 误,只是你只需要修改Tomcat服务器中web.xml
<init-param>
<param-name>listing</param-name>
<param-value>false(将其改为true)</param-value>
</init-param>
5.WEB-INF下面必须要有几个固定的文件夹和文件
web.xml 该web app的配置文件
lib 该web app用到的库文件
classes存放编译好的servlet
请注意他们的名字,以免错写浪费的精力去查错。
6. 如果要运行的不是.jsp文件,而是servlet(.class)文件,要配置web.xml(当然是WEB-INF下面的),加上以下字段:
<servlet>
<servlet-name>HelloWorldServletservlet-name
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/HelloWorldServlet</url-pattern>
</servlet-mapping>
其中的“HelloWorldServlet”改为你要运行的文件名。
7.其他解决思路
以上方法无果,介于“HTTP Status 404(The requested resource is not available)”异常发生情况的多样性,采用替换:
步骤:
a.找一份正常的相同环境(找同学同事相同开发环境机子或者网上下载的正常demo等)
b.依次替换问题项目文件,进行排除,定位。直到解决。
storage device什么意思|usb mass
violation writing的解决方法是什么|unhandled access
to restart什么意思|press ctrl+alt+delete
开机时rebootandselectproperbootdevice应该怎么办?
is unable如何解决|苹果手机出现the store
a problem has been detected(电脑蓝屏)
must be empty应该怎么办|steam destination folder
proper boot device如何解决|电脑提示reboot and select
虚拟机的VMware Authorization service未运行
out of date。killing的解决办法|adb server is
connection refused拒绝了连接应该怎么办|localhost err
proper boot device|开机显示reboot and select
version of runtime to的方法|解决unable to find a
插入u盘不显示usb mass storage device 应该怎么办
3DMAx报错Thesoftwarelicensecheckout
indented block,应该怎么办?|indentationerror:expected an
pressctrlaltdeltorestart怎么解决
adobe illustrator cc已停止工作应该怎么处理
no和not的区别 no和not的区别是什么
三星笔记本开机出现all boot options are tried怎么办
designer将gerber文件反向生成pcb|怎么用altium
dispatcherservlet的作用
Bundle(Eclipse)下载安装|Android开发环境ADT
failedtoloadtheadobeflashplayer应该怎么办
cad激活问题:could not get debug privilege如何解决
世界十大气势磅礴的音乐排名,She is my sin、The dawn热血沸腾
解决microsoft visual c++ runtime library教程
dump file error183|玩LOL提示failed to create
to restart怎么解决|press ctrl+alt+del
the earlier…the better造句
http 错误 500.22 - internal server error解决教程
steam is not installed翻译
需要trustedinstaller提供的权限怎么办
fatalerrorsystemhalted什么意思
at address的解决教程|access violation
to continue的解决教程|steam无法安装提示close steam
multipleannotationsfoundatthisline怎么解决|jsp
出现此apple id尚未在itunes store使用怎么解决
Altium Designer10 如何导出Gerber文件
此Apple ID尚未在iTunes Store使用过
ther和others和the other和the others的区别是啥?