<jsp:include> action tag

The jsp:include action tag of JSP is used to insert a JSP file in another file(resource) like include page directive. The resource may be jsp file or html file or servlet.

The jsp include action tag includes the resource at request time so it is better for dynamic pages because there might be changes in future.

The jsp:include tag can be used to include static as well as dynamic pages.

Example

 

index.jsp
<html> 
<head> 
<title> JSP include Action</title> 
</head> 
<body> 
<h2> JSP include action page</h2> 
<jsp:include page="welcome.jsp"/> 
</body> 
</html>


 

welcome.jsp
<html> 
<head> 
<title> JSP include Action</title> 
</head> 
<body> 
<h2> Welcome 2 java8s.com</h2>
</body> 
</html>

Output

jsp.JPG

Our Services:

Java Training | Python Training | Machine Learning with Python Training | Deep Learning with Python Training | Projects

SILAN Technology
Call to: 9439202111  |  9658317757  |  0674-2361252

Comment