david chan wrote:
>
> Hi,
> I am using Apache 1.3.12/Tomcat 3.1, and suddenly the JSP reloading doesn't
> work. It works before and I checked my conf files, there is already
> reloadable="true" in the context path setting.
> I think the reload doesn't work when I have put a include file in all my jsp
> by this : <% include file="myinclude.jsp" %>.
> Then even if I delete the "myinclude.jsp", it still exists in my jsp output
> even I restart the computer !
> It looks like this file is been cached in somewhere.
> And I can only make it reload when I intentionaly make a sytax error in the
> jsp files that include the "myinclude.jsp", so the jsp container recompile
> the jsp page to class, but that is not convenient since I have a lot of jsp
> page include the "myinclude.jsp".
> Does any one have any clue about this ?
Tomcat 3.1 doesn't automatically detect changes to files you include using
the include directive. You have to change the modification date of the
JSP page that includes it before Tomcat creates a new version. On a Unix
system this is easy to do using the touch command. I'm not sure if there's
something similar for Windows.
You may want to use the <jsp:include> action instead. It includes the output
from the specified page, instead of merging the specified page with the
including page like the include directive does. A drawback with the action
though is that it flushes the buffer before including the page, so you can't
forward, redirect or set headers after the include. Tomcat 3.1 also have
problems reporting runtime errors that occurs after an include action.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets