Hi Dermot,
The best way you could do this is to the include(request, response ) of the
request dispatcher.
Here is snippet that might help you !
....
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<html><h1>Main Content</h1>");
RequestDispatcher rd = getServletContext().getRequestDispatcher("/mano.htm");
if(rd!=null)
rd.include(req,res);
out.println("<h1>Main Content</h1></html>");
out.close();
...
Where mano.htm contains some html code
Hope this helps
Mano
PS: Any specific reason you dont want to use JSP?

-----Original Message-----
From: Dermot Reid [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 5:46 PM
To: [EMAIL PROTECTED]
Subject: html templates


Hi there..

I'm currently using a mix of ASP and COM objects for web applications, and I
wish to try servlets out. However, as much of the final html content is
stored in header and footer templates, and included in the document using
SSI (eg. <--#include file=blah.inc--> etc..) it seems like there should be
some more efficient way to wrap my query results etc. in static content,
without continuing to use asp or ssi...(I don't really want to use JSP's).
My question really is, which is the most efficient way to include predefined
static content from within a servlet. (Outputting html line-by-line from the
servlets using a PrintWriter etc isn't really nice)

hope this makes sense..
Dermot R.

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to