T
tsizhao
Unregistered / Unconfirmed
GUEST, unregistred user!
问题是这样的,就是我的TOMCAT是5.0.28的,我的servlet在TOMCAT的根目录下webapps/ROOT/WEB-INF/classes时是可以找到并正确显示servlet的,当我把他放在TOMCAT的webapps/my/WEB-INF/classe时,就出出现找不到servlet的错误,在server.xml中也设计了映射, <Context path="/my"
docBase="my"
debug="0"
crosscontext="true"
reloadable="true">,
同时web.xml的配置是这样的:<servlet-name>ServletDemo</servlet-name>
<servlet-class>com.tsizhao.ServletDemo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletDemo</servlet-name>
<url-pattern>/servlet/ServletDemo</url-pattern>
</servlet-mapping>
出现在错误是这样的:
HTTP Status 404 - /my/servlet/ServletDemo
--------------------------------------------------------------------------------
type Status report
message /my/servlet/ServletDemo
description The requested resource (/my/servlet/ServletDemo) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.0.28
这是为什么? 难道还要配置其它什么吗?书上的tomcat是4.0.*的,也就只是写到这样的就行了哦。请知道的朋友指点一下。感激不尽!~~谢谢!~~~~
docBase="my"
debug="0"
crosscontext="true"
reloadable="true">,
同时web.xml的配置是这样的:<servlet-name>ServletDemo</servlet-name>
<servlet-class>com.tsizhao.ServletDemo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletDemo</servlet-name>
<url-pattern>/servlet/ServletDemo</url-pattern>
</servlet-mapping>
出现在错误是这样的:
HTTP Status 404 - /my/servlet/ServletDemo
--------------------------------------------------------------------------------
type Status report
message /my/servlet/ServletDemo
description The requested resource (/my/servlet/ServletDemo) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/5.0.28
这是为什么? 难道还要配置其它什么吗?书上的tomcat是4.0.*的,也就只是写到这样的就行了哦。请知道的朋友指点一下。感激不尽!~~谢谢!~~~~