更多技术文章请访问我的个人博客
<jsp:include page="/article_show_All.jsp"></jsp:include>
‘ / ’表示是根目录,这个其他语言也是一样的。如果是 根目录-子文件夹 如果我想要在* index.jsp中显示menu文件夹中的head.jsp* 内容怎么写: <jsp:include page="/menu/head.jsp"></jsp:include>
这行代码的意思是根目录下的menu文件夹里的head.jsp如果是在子文件夹-子文件夹 如果想要在* foot.jsp中导入head.jsp* 应该怎么写,两种写法, <jsp:include page="/menu/head.jsp"></jsp:include>
这是很标准的写法,还有就是<jsp:include page="head.jsp"></jsp:include>
这两种写法都是通过的,但尽量使用第一种,写的清清楚楚,不会引起歧义如果在 子文件夹-根目录 如果想要在* foot.jsp中导入根目录下的index.jsp文件* <jsp:include page="/index.jsp"></jsp:include>
更多技术文章请访问我的个人博客
新闻热点
疑难解答