File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Include file issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Include file issue" Watch "Include file issue" New topic

Include file issue

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
Hi Geeks,

I included <%@ include file="../topMenu/order" %> in most of my jsp page, which order contains some static HTML tags. Once I made changes to the order page, I have to made changes to each of the jsp that includes the order page. Is there anyway to avoid this tedious operation? Please help me, as I am suffering now ....

Myriads Thanks,

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
Each JSP file that has been accessed at least once has corresponding Servlet in work folder. Delete related Servlets from work folder. Now when you access JSP file again, new Servlet will be generated � which will have updated content of �order�.

If you are working on Development server, for ease, you can delete all Servlets from the work folder.

My blood is tested +ve for Java.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

What container are you using?

I know that all but the oldest versions of Tomcat will check for changes in the included pages and recompile automatically for you.

If you're on a Unix box, the touch command will reset the last-modified date for the files. This can be run on your whole JSP directory.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Include file issue
It's not a secret anymore!