Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP templates

Status
Not open for further replies.

handleWise

Programmer
Mar 3, 2005
1
GB
Hi

I am trying to create some basic JSP templates so my layout is flexible. But its just not happening and driving me nuts in the process. I'm new to JSP and servlets and have been using this tutorial:
does anyone have any simple examples they could offer.
All help appreciated
thanks
 
The tutorial in the link is using taglib, can just include the jsp page containing the html code and jsp code.

<!--temp.jsp-->
<html><head><title>JSP Templates</title></head>
<%
int a = 0;
%>
<table>
<tr valign='top'><td>left</td>
<td><table>
<tr><td><%@include file='header.jsp'%></td></tr>
<tr><td>intro <%=b%></td></tr>
<tr><td>footer</td></tr>
</table>
</td>
</tr>
</table>
</body></html>

<!--header.jsp-->
<%
out.println(a);
int b = 1;
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top