Hi
I have a question....I want to know if the following is bad design.
I have a servlet, called Simple, with the following doPost code in it
[snip]
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
PrintWriter out = response.getWriter();
out.println("Simple.doPost() I am a test printing a line from
Simple.");
}
[snip]
I call this from a jsp file
------------------------------
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html">
</HEAD>
<BODY>
<%@ include file="header.jsp" %>
<jsp:include page="/servlet/simple" flush="true"> </jsp:include>
<%@ include file="footer.jsp" %>
</BODY>
</HTML>
------------------------------
Is this a bad design?
If in the doPost() method in Simple I have a out.close() then the
[snip]
<%@ include file="footer.jsp" %>
</BODY>
</HTML>
[end of jsp file]
is not included in the output of the jsp page when it is run. Should
I use a custom taglib instead?
I have a number of pages which I want to have a common header and
footer, but I want the middle part to be constructed by a servlet. Whats
the best way to go about this?
Cheers
Tony
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html