Fragment "cond.jsp" was not be found at expected path /MyWeb/WebRoot/cond.jsp
这是提示出来的错误,希望各位大虾可以帮助解决下

解决方案 »

  1.   

    在指定的路径下面没有找到cond.jsp文件,请检查路径是否正确,目标文件是否存在,注意大小写!
      

  2.   

    贴项目目录结构。 include cond.jsp 的文件代码。
      

  3.   

    大小写都没错,路径就是放在webroot文件夹里面,文件路径是D:\Program Files\workspace\MyWeb\WebRoot
    基本上是默认代码,就body里面加了个include。。
    <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'MyJsp.jsp' starting page</title>
        
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->  </head>
      
      <body>
        This is my JSP page. <br>
        <%@ include file="cond.jsp"%>
      </body>
    </html>
      
      

  4.   

    MyWeb
    src文件夹
    jre system library
    j2ee1.4libraries
    webroot文件夹
      meta-inf
      web-inf
      index.jsp
      MyJsp.jsp
    这就是目录结构
      

  5.   

    大小写都没错,路径就是放在webroot文件夹里面,文件路径是D:\Program Files\workspace\MyWeb\WebRoot
    基本上是默认代码,就body里面加了个include。。
    <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <base href="<%=basePath%>">
        
      <title>My JSP 'MyJsp.jsp' starting page</title>
        
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->  </head>
       
      <body>
      This is my JSP page. <br>
      <%@ include file="cond.jsp"%>
      </body>
    </html>
       
    MyWeb
    src文件夹
    jre system library
    j2ee1.4libraries
    webroot文件夹
      meta-inf
      web-inf
      index.jsp
      MyJsp.jsp
    这就是目录结构