March 25th, 2003, 07:56 AM
JSP directive from within a Servlet
sorry if this is stupidly simple, but I can't seem to figure it. Using Tomcat as a Stand-Alone server, I'd like to be able to write a JSP [include] directive from within my Servlet's [doGet] method and still have that executed as the servlet's page[stream] gets served up.
But I'm not sure it's possible. At least I can't seem to get it to work.
Tried writing both
<%@ include file="header.jsp">
<%@ include file="footer.html">
But both just seem to come up as hidden text in the HTML source.
Is it at all possible or am I barking up the wrong tree please?
March 25th, 2003, 09:47 AM
In a servlet you have to use this:
March 25th, 2003, 09:52 AM
That works like a charm.
Thank you Nemi.