and instructions include instructions taglib

1, include instructions for containing another static file, the file may be a static JSP page, a Servlet, text file, JSP tags.

include.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>我是include.jsp</h3>
<h5>JSP:<%@include file="include-jsp.jsp"%></h5>
</body>
</html>

include-jsp.jsp:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>include-jsp</title>
</head>
<body>
<h3>我是插入到JSP页面中的JSP</h3>
</body>
</html>

 

Guess you like

Origin www.cnblogs.com/zhai1997/p/11617085.html