此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【ljywit】截止到2008-07-14 15:00:58的历史汇总数据(不包括此帖):
发帖的总数量:2                        发帖的总分数:40                       每贴平均分数:20                       
回帖的总数量:1                        得分贴总数量:0                        回帖的得分率:0%                       
结贴的总数量:0                        结贴的总分数:0                        
无满意结贴数:0                        无满意结贴分:0                        
未结的帖子数:2                        未结的总分数:40                       
结贴的百分比:0.00  %               结分的百分比:0.00  %                  
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html

解决方案 »

  1.   

    tomcat版本?
    web.xml内容?
    建议你把root下的web.xml拷贝到你的myapp的WEB-INF下
      

  2.   

    我的版本的5.5的
    web.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">  <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description><!-- JSPC servlet mappings start -->    <servlet>
            <servlet-name>org.apache.jsp.index_jsp</servlet-name>
            <servlet-class>org.apache.jsp.index_jsp</servlet-class>
        </servlet>    <servlet-mapping>
            <servlet-name>org.apache.jsp.index_jsp</servlet-name>
            <url-pattern>/index.jsp</url-pattern>
        </servlet-mapping><!-- JSPC servlet mappings end --></web-app>
    是root中的web.xml
    同样出现上面的错误。
    对了,有没有其他的建立的方法?
      

  3.   

    在server.xml文件中配置context就可以了
      

  4.   

    在server.xml文件中配置context也配了,还是不行。
    ......
        <!--
            <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->
          <Context path="/myapp" docBase="f:/jsp" debug="0" reloadable="true" />
          </Host>    </Engine>
    ......
    重新启动tomcat后,在f:\jsp\example.jsp
    输入http://127.0.0.1:8080/myapp/example.jsp
    出现的错误如下:
    type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to load class for JSP
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:599)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause java.lang.ClassNotFoundException: org.apache.jsp.example_jsp
    java.net.URLClassLoader$1.run(Unknown Source)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(Unknown Source)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:597)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.我是不是其他的问题?