January 10th, 2008
file attribute is a relative URL. A few caveats concerning the use of the include directive are in order. First, be aware that the file to be included may (and usually does) contain JSP code. If the to-be-included file contains page directives, the restriction about the multiple occurrences of page directive attributes applies. In other words, you cannot have an included file contain a page directive with an attribute already coded in the JSP page (except the import attribute). Another caveat is that when you change an included file, you must update all the JSP files that include the changed file. What you need is a JSP or server command that tells the JSP translator to retranslate, but such a command is not currently available. The JSP translator detects when JSP pages require translation based on modification dates. An admittedly primitive but effective workaround is to change a comment in your pages that uses included files to force a retranslation. Later in this chapter, in the section titled Coding JSP Standard Actions, you ll read about the
Need a managed web hosting provider to help maintain your website? Our web hosting service is the preferred choice of thousands of demanding customers.