我为我的very应用程序中的所有JSP做了一个模板,使事情变得非常简单:
<%@ include file="header.jsp" %>
<!-- Put unique content here -->
<%@ include file="footer.jsp" %>
随着header.jsp越来越大,我决定将导航菜单从它自己的文件中移出。我将菜单的代码放入menu.jsp中。下面是包含在我的header.jsp:中的样子
<html>
<head>
<title>My JSP
如何从jsp包含引用一个jsp的链接内容?
index.jsp
<%@ include file="link.jsp"%>
<html>
//can I get the link.jsp link from here with this include?
</html>
link.jsp
<html>
<a href"someplace"></a> <--I want this to be a reference to other jsps
</html&