<%@ include file="../doAdmin/doExit.jsp" %>
  这样写路径为什么报错????
<%@ include file="doExit.jsp" %>
这样写不报错,但路径是错误的

解决方案 »

  1.   

    严重: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /admin/index.jsp(7,0) File "/admin/doAdmin/doExit.jsp" not found
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
    语法在这:<%@ page language="java" pageEncoding="gbk"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>管理首页</title><%@ include file="doAdmin/doExit.jsp" %><link rel="stylesheet" type="text/css" href="../css/jd100.css">
    <script type="text/javascript" language="javascript">
      var blockDiv=true;
    function showGame()
    {
      if(blockDiv)
    {
    document.getElementById("leftDiv").style.display="block";
    blockDiv=false;
    }
    else
    {
    document.getElementById("leftDiv").style.display="none";
    blockDiv=true;
    }
    }
    </script>
    </head>谢谢,急需解决
      

  2.   

    报错原因是找不到路径  你可以把doAdmin/doExit.jsp Cut到当前路径下
      

  3.   

    问题是别的文件下也要用到JSP文件。那每个这样的话是不友好的啦
      

  4.   

    <%@ include file="doExit.jsp" %>放在同一路径下,报了这个错编释都通不过说
    Users cannot be resolued to a type
      

  5.   

    inclue  引用的文件里是不是存在<html>标签呀?
      

  6.   

    用动态包含。
    <jsp:include page="../doAdmin/doExit.jsp"/>
    <%@ include file="绝对路径或相对路径"%>
    静态包含file地址要么是文件名开头,要么是 / + 文件名。