Tomcat6.0.18下出现The requested resource(/)is not available
2009-11-04 23:09
537 查看
转自:http://blog.chinaunix.net/u2/74747/showart_1133187.html
Tomcat6.0.18下出现The requested resource(/studystruts)is not available
最近学习struts,写了一个很简单的struts小项目首次使用Tomcat6.0测试。
出现问题:输入http://localhost:8080/studystruts出现下面的错误提示页面
HTTP Status 404 - /studystruts/
typeStatus report
message/studystruts/
descriptionThe requested resource (/studystruts/) is not available.
Apache Tomcat/6.0.18
反复查看了类和配置文件,都没有发现什么错误,后 来将该项目部署到Tomcat5.0下却能正常运行,看来源代码并没有错误。从网上搜索解决该问题的办法,后来发现Tomcat6.0.18与 Tomcat5.0.25的默认配置有一些不同(至于其他的配置有何不同暂未研研),Tomcat6默认是关闭了目录浏览功能的,这个主要是出于安全性的 考虑。
对应的配置选项在apache-tomcat-6.0.18/conf/web.xml配置如下:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
解决方法:
将其中的
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
设置由false改为true,即可开启目录浏览功能
而在Tomcat5.0.25中
对应的配置选项在apache-tomcat-5.0.25/conf/web.xml配置如下:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
已经开启目录浏览功能
Tomcat6.0.18下出现The requested resource(/studystruts)is not available
最近学习struts,写了一个很简单的struts小项目首次使用Tomcat6.0测试。
出现问题:输入http://localhost:8080/studystruts出现下面的错误提示页面
HTTP Status 404 - /studystruts/
typeStatus report
message/studystruts/
descriptionThe requested resource (/studystruts/) is not available.
Apache Tomcat/6.0.18
反复查看了类和配置文件,都没有发现什么错误,后 来将该项目部署到Tomcat5.0下却能正常运行,看来源代码并没有错误。从网上搜索解决该问题的办法,后来发现Tomcat6.0.18与 Tomcat5.0.25的默认配置有一些不同(至于其他的配置有何不同暂未研研),Tomcat6默认是关闭了目录浏览功能的,这个主要是出于安全性的 考虑。
对应的配置选项在apache-tomcat-6.0.18/conf/web.xml配置如下:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
解决方法:
将其中的
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
设置由false改为true,即可开启目录浏览功能
而在Tomcat5.0.25中
对应的配置选项在apache-tomcat-5.0.25/conf/web.xml配置如下:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
已经开启目录浏览功能
相关文章推荐
- Tomcat6.0.18下出现The requested resource(/)is not available
- Tomcat6.0.18下出现The requested resource(/)is not available
- Tomcat7下出现The requested resource(/)is not available
- eclipse新建web项目运行时出现The requested resource is not available异常
- tomcat与struts2配置,解决了The requested resource is not available问题
- !!注意!部署出现the requested resource is not available
- jsp java web使用struts2后出现“The requested resource is not available”
- [Liferay]springMVC在Liferay中出现过的问题:The requested resource () is not available
- javaee中.jsp的文件存放错误出现jsp the requested resource is not available.
- servlet web.xml配置好以后还会出现 the requested resource is not available错误的可能原因
- jsp出现404(The requested resource is not available.)
- tomcat: The requested resource is not available.一种可能的原因
- 8、arcserver中出现Error: HTTP Status 404 /arcgis/rest: The requested resource (/arcgis/rest/) is not available
- 出现The requested resource is not available.错误
- Tomcat6.0.18下出现The requested resource(/struts_login)is not available
- 因配置不对,导致出现The requested resource is not available的解决方法
- 使用struts2后出现“The requested resource is not available”
- eclipse新建web项目运行时出现The requested resource is not available异常
- HTTP Status 404(The requested resource is not available)
- The requested resource (Servlet action is not available) is not available.这个问题让我通宵了一个晚上