❮ Previous Next ❯

<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
❮ Previous Next ❯

Follow Us




  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved