http://localhost:8080/hello/index.jsp,你试一试!是路径问题!

解决方案 »

  1.   

    http://localhost:8080/hello  这个不对
    http://localhost:8080/hello/index.jsp
      

  2.   

    需要创建一个/WEB-INF/web.xml
    在web.xml里面输入
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" 
    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">

    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    </web-app>
    用这个试一下
      

  3.   

    你的主文件是index.jsp所以应输入的地址为:http://localhost:8080/hello/index.jsp,如果是index.html可以为:http://localhost:8080/hello
      

  4.   

    HTTP Status 404 - /hello/  是未找到资源才会出现的页面
    那就是你的路径写错了 
    你可以在IE里输入你http://localhost:8080/hello/index.jsp,或者在tomcat根目录的conf/web.xml的里插入下面的代码:
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>