必须在hello目录下建一个名称为WEB-INF的文件夹~
解决方案 »
- jsp连接sql server数据库问题
- Lucene删除Document,后产生的多余的文件.
- 不用spring,在hibernate里能否用上template?
- 如何让tomcat启动时执行某一方法
- 请问如何强制浏览器使用https方式访问resion服务器,谢谢了!
- 如果往xml文件中加入相同的节点,xml会怎么处理?
- 。。。。。。java一多线程问题求教
- 请教各位大侠关于使用RMI中出现的错误:java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception
- 关于<jsp:include 急!!!!!
- 关于一个计时的问题
- 关于连接数据库写到配置文件的问题
- (续)Struts+Spring+Hibernate+Jta配置 table or view does not exist
必须建立hello\WEB-INF\web.xmlweb.xml是配置文件内容如下
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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"> </web-app>
tomcat5.x版本需要在你的应用程序目录下创建/WEB-INF/web.xml才能识别它是一个web应用.
tomcat6.x版本就不需要了.LZ用的是5.X版本吧?如果嫌麻烦就换6.X吧
当然楼上很多人说建web-inf目录还有web.xml,那是用来部署servlet用的.就单访问一个index.jsp的话可以不建那些,你可以去试试