必须在hello目录下建一个名称为WEB-INF的文件夹~

解决方案 »

  1.   

    Tomcat 5.0\webapps目录中创建一个hello目录
    必须建立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>
      

  2.   

    把index.jsp文件 直接放在ROOT 文件夹下也行
      

  3.   

    我刚学jsp的时候,买了一本基础教程。哈哈,书上的实例都是错的啊,我还买的是正版的呢。。每次做示例就是专门找别扭
      

  4.   

    最好通过IDE创建project,很多配置信息都自动生成.自己手动创建会出现很多问题的...
      

  5.   

    把index.jsp直接放在TOMCAT\webapps\ROOT下面再启动TOMCAT,然后输入http://127.0.0.1:8080/index.jsp就OK了
      

  6.   

    TOMCAT启动时需要确定webapps下的目录是一个web程序还是一个普通的目录,
    tomcat5.x版本需要在你的应用程序目录下创建/WEB-INF/web.xml才能识别它是一个web应用.
    tomcat6.x版本就不需要了.LZ用的是5.X版本吧?如果嫌麻烦就换6.X吧
      

  7.   

    建议你把tomcat升一下级,最好是5.5.9以后的
      

  8.   

    我遇到的问题和你差不多,我是在webapp下建立myapp文件夹然后在其中建立WEB-INF,再见hello.jap,但输入http://localhost:8080/myapp后,提示的错误信息和你类似
      

  9.   

    如果你只是想访问index.jsp文件的话那么你的访问路径是错的.应该写成http://localhost:8080/hello/index.jsp
    当然楼上很多人说建web-inf目录还有web.xml,那是用来部署servlet用的.就单访问一个index.jsp的话可以不建那些,你可以去试试