Tuesday, October 20, 2009

JSP - include several differnt files to create content

<!-- This is the file "head.jsp" --> 
<!-- This file just has head type info --> 
<html> 
    <head> 
        <title>the title</title> 
    </head> 
 
 
<!-- this is the file "body.jsp" --> 
<!-- this file contains the content portion of the site --> 
 
<body> 
    <p> 
        Content goes here
    </p> 
</body> 
</html> 
 
<!-- this is the file called main.jsp --> 
<!-- this files purpose is to bring in all the 
 
<%@ include file="head.jsp" %>
<%@ include file="body.jsp" %>
 
    <% 
 
    // When you include files you bring the file's data 
    // (whether its html or jsp code) into the calling 
    // page. 
 
    %> 
 

No comments:

Post a Comment