TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday, 27 April 2020

JSP Include Directive In Java | JSP Include Directive Tag In Java

JSP Include Directive

The include directive is used to include the contents of any resource it may be jsp file, html file or text file. The include directive includes the original content of the included resource at page translation time (the jsp page is translated only once so it will be better to include static resource).

 Advantage of Include directive

 Code Reusability

download image of jsp include directive

Fig: JSP Include Directive  

 Syntax of include directive


        <%@ include file="resourceName" %>  

 

Example of include directive

In this example, we are including the content of the header.html file. To run this example you must create an header.html file.

     <html>  
      <body>  
  
      <%@ include file="header.html" %>  
  
     Today is: <%= java.util.Calendar.getInstance().getTime() %>  
  
     </body>  
    </html>  

No comments:

Post a Comment