我在tomcat的webapps目录下新建了一个test1的目录,在test1里放了很多jsp页面,比如说一个mydemo.jsp的文件,我输入http://localhost:8080/test1/mydemo.jsp可以执行,其他的也都可以执行,但是我要是只输入http://localhost:8080/test1却提示错误:HTTP状态404 - /test1/
--------------------------------------------------------------------------------type 状 态 报 告信 息 /test1/描 述 没有所要求的资源(/test1/)

解决方案 »

  1.   

    你没有设置欢迎页面   你需要先指定test1的欢迎页面比如 为 index.jsp, http://localhost:8080/test
    才会自动显示index页面,其实没必要的,你想显示哪个页面就直接敲全就ok了!   
      

  2.   

    tomcat默认找得是index.jsp文件,你在项目下加一个index.jsp文件,看看还报不报错
      

  3.   

    可以在web.xml配置<welcome-file-list>
    <welcome-file>index.html</welcome-file>
    < </welcome-file-list>
      

  4.   

     要是想打上如上述所说的http://localhost:8080/test1
    就显示出来该文件夹下所有的可执行的 jsp,html等文件,
    该怎样设置呀?
    谢谢!!
      

  5.   

    <welcome-file-list > 
    <welcome-file >index.jsp </welcome-file > 
    < </welcome-file-list >
    改为
    <welcome-file-list > 
    <welcome-file >mydemo.jsp </welcome-file > 
    < </welcome-file-list >
      

  6.   

    我在tomcat的webapps目录下新建了一个test1的目录,在test1里放了很多jsp页面,比如说一个mydemo.jsp的文件,我输入http://localhost:8080/test1/mydemo.jsp可以执行,其他的也都可以执行,但是我要是只输入http://localhost:8080/test1却提示错误: HTTP状态404 - /test1/ 
    -------------------------------------------------------------------------------- type 状 态 报 告 信 息 /test1/ 描 述 没有所要求的资源(/test1/) 我想要的结果是当我输入http://localhost:8080/test1时,他把该文件下的所有可执行的文件夹都显示出来