<?xml version="1.0" encoding="ISO-8859-1"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>Welcome to Tomcat</display-name> <description> Welcome to Tomcat </description>
如果是地址不对。应该在哪里设置呢
<servlet>
<servlet-name>yourservletName</servlet-name>
<servlet-class>yourservletPackage.YourServletClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>yourservletName</servlet-name>
<url-pattern>/servlet_one</url-pattern>
</servlet-mapping>
<!--
Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"> <display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<servlet>
<description></description>
<display-name>toool</display-name>
<servlet-name>toool</servlet-name>
<servlet-class>bang.toool</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>toool</servlet-name>
<url-pattern>/toool</url-pattern>
</servlet-mapping></web-app>tomcat的bin目录下。找不到配置文件。只有些BAT 和JAR的
这个是我在E:\eclipse\workspace\tombang\WebContent\WEB-INF 目录下的WEB.XML文件