学习jsp和servlet,避免不了的要和tomcat打交道,但tomcat经常会出现各式各样的错误
HTTP Status 404(The requested resource is not available)的几种解决方案
1. 未部署Web应用
2.
2.URL输入错误
排错方法:
首先,查看URL的IP地址和端口号是否书写正确。
其次,查看上下文路径是否正确 Project--------Properties------MyElipse-----Web----- Web Context-root检查这个路径名称是否书写正确。
最后,检查一下文件名称是否书写正确。
3.目录不能被引用
排错方法:
在 Eclipse的“包资源管理器(Package Explorer)”检查文件存放的位置。由于META-INF
WEB-INF文件夹下的内容无法对外发布,所以,如果你引用了带这两个目录的文件,肯定是不允许。例如: doc.guandang.net就是错误的
文件位置存放错误
4. Tomcat服务器中web.xml中的问题
排错方法:
如果你的web应用程序有多个jsp页面的话,当你点击你web应用程序的虚拟根目录时可能会出现404错 误,只是你只需要修改Tomcat服务器中web.xml
<init-param>
<param-name>listings</param-name>
<param-value>false(将其该为true)</param-value>
</init-param>
5、WEB-INF下面必须要有几个固定的文件夹和文件
±web.xml 该web app的配置文件
±lib 该web app用到的库文件
±classes存放编译好的servlet
请注意他们的名字,我曾经就由于把classes写成class,查错查了半宿还没解决,所以写这些的时候千万要仔细,要不会浪费更多的精力去查错。
6、如果要运行的不是.jsp文件,而是servlet(.class)文件,要配置web.xml(当然是WEB-INF下面的),加上以下字段:
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
HTTP Status 404(The requested resource is not available)的几种解决方案 的几种解决方案 1. 未部署 Web 应用 2. 2.URL 输入错误 排错方法: 首先,查看 URL...
tomcat的配置问题-HTTP Status 404 问题解决方法(转)_IT/计算机_专业资料。tom.../MyServlet description The requested resource (/MyServlet) is not available....
Spring搭建出现HTTP Status 404解决方案_计算机硬件及网络_IT/计算机_专业资料。出现...resource="com/po/BookPO.hbm.xml" /> </session-factory> </hibernate-...
HTTP Status 404 - Servlet action is not available 解决了(structs 与 ...The requested resource (Servlet action is not available) is not available. ...
The requested resource (Servlet action is not available) is not available. ...出错提示为 HTTP Status 404 - Servlet action is not available ---...
由于各种原因可能会出现错误,下 面是最经常出现的错误: HTTP Status 404 -/...The requested resource(/myWeb/Hello) is not available. ? 404错误是最常见...
由于各种原因可能会出现错误,下 面是最经常出现的错误: HTTP Status 404 -/...The requested resource(/helloapp/hello) is not available. ? 404错误是最...
由于各种原因可能会出现错误,下面 是最经常出现的错误: HTTP Status 404 -/...The requested resource(/myWeb/Hello) is not available. 404错误是最常见的一...
HTTP Status 404 - Servlet action is not available...is not available description The requested resource...针对以上 4 种情况相应的解决方案如下: 1、在 web...
HTTP Status 404 - Servlet action is not available...is not available description The requested resource...针对以上 4 种情况相应的解决方案如下: 1、在 web...
热门文档