由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - Tomcat server.xml setting problem
相关主题
TOMCAT 3.2 and TOMCAT 4.1 question, Help?table在IE7中显示不正常,何故?
有用过MEAN.io的吗?js实现的网页内容折叠在firefox下不行
Urgent! Session Var timeout with SSL enabled这个有背景图片的菜单的无子菜单的why-a-gap-here项后面为什么断了?
Word file in IE为什么这个小html程序在firefox和ie上运行结果不一样?
cross browser/platform .netLooking for web graphic designer
问个用table控制版面的问题anyone know jsp, help me
问个css在IE和ff下显示不同的问题请教高手们一PHP的问题
How to set subdomain folder in ApacheTomcat Directory and Virtual Host problem????
相关话题的讨论汇总
话题: web话题: tomcat话题: inf话题: examples话题: webapps
进入BuildingWeb版参与讨论
1 (共1页)
a*********s
发帖数: 22
1
我想把我自己写的文件放在一个工作目录里,我在tomcat的server.xml里加上了

crossContext="true"/>
可是怎么总是出错啊?比如我写了一个myHelloWorld,放在
D:\jakarta-tomcat-4.1.24\webapps\myapp\WEB-INF\classes试的时候总是得到下面
的错误。如果
文件放在examples目录下(D:\jakarta-tomcat-4.1.24\webapps\examples\WEB-INF\classes)
就可以用。
HTTP Status 404 - /myapp/servlet/myHelloWorld
m**c
发帖数: 90
2

You don't have "web.xml" at ./WEB-INF directory. Check the one in examples.
You need to map "/servlet" in "web.xml".
文件放在examples目录下(D:\jakarta-tomcat-4.1.24\webapps\examples\WEB-INF\class
es)

【在 a*********s 的大作中提到】
: 我想把我自己写的文件放在一个工作目录里,我在tomcat的server.xml里加上了
:
: : crossContext="true"/>
: 可是怎么总是出错啊?比如我写了一个myHelloWorld,放在
: D:\jakarta-tomcat-4.1.24\webapps\myapp\WEB-INF\classes试的时候总是得到下面
: 的错误。如果
: 文件放在examples目录下(D:\jakarta-tomcat-4.1.24\webapps\examples\WEB-INF\classes)
: 就可以用。
: HTTP Status 404 - /myapp/servlet/myHelloWorld

a*********s
发帖数: 22
3
Thx. But...
I checked the web.xml under examples/web-inf, but looks like there is no place
for me to change the settings. Could you tell me exactly how I should do it?

【在 m**c 的大作中提到】
:
: You don't have "web.xml" at ./WEB-INF directory. Check the one in examples.
: You need to map "/servlet" in "web.xml".
: 文件放在examples目录下(D:\jakarta-tomcat-4.1.24\webapps\examples\WEB-INF\class
: es)

m**c
发帖数: 90
4

Sorry I didn't make myself very clear in my post: You need to have a file
called "web.xml" in "${TOMCAT_HOME}/webapps/myapp/WEB-INF". You can copy
"web.xml" from "${TOMCAT_HOME}/webapps/examples/WEB-INF" to
"${TOMCAT_HOME}/webapps/myapp/WEB-INF", then modify it a little bit. Why
don't post the "web.xml" from "${TOMCAT_HOME}/webapps/examples/WEB-INF" to
this board so that I can take a look?
place
it?
examples.

文件放在examples目录下(D:\jakarta-tomcat-4.1.24\webapps\examples\WEB-INF\class

【在 a*********s 的大作中提到】
: Thx. But...
: I checked the web.xml under examples/web-inf, but looks like there is no place
: for me to change the settings. Could you tell me exactly how I should do it?

a*********s
发帖数: 22
5
Thx. The following is the web.xml from examples\web-inf. I did copy it into
my work-folder, but don't know how to modify it. I really don't understand
this file.

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

Tomcat Examples

Tomcat Example servlets and JSP pages.