如果tomcat的root下有一文件夹aa,里面有一文件index.jsp,并且webapps下也有一文件夹aa,里面也有一文件index.jsp,如果在一个jsp文件中需要用相对路径<%@include file="/index.jsp"%>时,被include的是哪一个index.jsp?为什么?

解决方案 »

  1.   

    webapps/root/下有一个文件1.jsp,我用<%@include file="/aa/index.jsp?"%>包含webapps/aa/index.jsp文件,可是提示出错,怎么办?
      

  2.   

    <%@include file="../aa/index.jsp"%>
      

  3.   

    用了<%@include file="../aa/index.jsp"%>提示出错org.apache.jasper.JasperException: /1.jsp(4,0) File "/../aa/index.jsp" not found
      

  4.   

    随便修改一个index.jsp看看 就知道是调用哪个的啦