jdk没问题了,http://localhost:8080/也可以,但http://localhost:8080/myapp/index.jsp就是不行,提示如下:
HTTP Status 404 - /myapp/index.jsp--------------------------------------------------------------------------------type Status reportmessage /myapp/index.jspdescription The requested resource (/myapp/index.jsp) is not available.myapp里的WEB-INF的WEB-INF是:
<?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">
  <web-app>
  <display-name>My Web Application</display-name>
  <description>
  A application for test.
  </description>
  </web-app>index.jsp的内容是:
<html>
<body>
<center>
  Now time is: 
</center>
</body>
</html>
我的tomcat是apache-tomcat-5.5.26

解决方案 »

  1.   

    myapp这个目录放在哪的,如果是放在tomcat的ROOT文件夹内是可以的,如果你放在别出,需要配置目录的
      

  2.   

    webapps下不是有个root目录放在里面就可以了,这是个路径问题了
      

  3.   

    我刚刚测试了
    你的web.xml可能错了。<?xml version="1.0" encoding="ISO-8859-1"?><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/web-app_2_4.xsd"
    version="2.4">

    <display-name>Web Application</display-name> <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
    </context-param>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
             <jsp-config>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/sql</taglib-uri>
    <taglib-location>/WEB-INF/tld/sql.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri>
    <taglib-location>/WEB-INF/tld/x.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/functions</taglib-uri>
    <taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
    </taglib>
    </jsp-config>
    </web-app>
      

  4.   

    按照你的意思在webapps建立了myapp文件夹
    在myapp文件夹下建index.jsp
    同时建立WEB-INF文件夹
    注意index.jsp和WEB-INF是同一目录
    然后在WEB-INF下建web.xml
    web.xml内容如上,重启TOMCAT是可以访问的。
      

  5.   

    shi a  !我以前遇到过这样的问题。但是
      

  6.   

    用eclipse吗?
    发布一下就到webapps下了
    如果没有用IDE
    在webapps下建工程包myapp-》jsp页面
                           -》WEB-INF->web.xml