gudii9
asked on
static and dynamic include of jsp.
I have not understood clearly difference between static and dynamic include of jsp. Which one to use where and how.
please advise.
Any links resources, sample code, ideas highly appreciated. Thanks in advance
please advise.
Any links resources, sample code, ideas highly appreciated. Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Does the paragraph on "JSP Processing" in the middle of the following page
http://oreilly.com/catalog/jserverpages2/chapter/ch03.html
help explain to you?
http://oreilly.com/catalog/jserverpages2/chapter/ch03.html
help explain to you?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
One common issue with include directive (if it's used to include another JSP) is that the main JSP (which calls this directive to include another JSP) doesn't get re-compiled in the case when the included JSP changes but not the main JSP. Reason being, a JSP is re-compiled only if the contents of the JSP changes. Now in this case, the main JSP (after inclusion) remains the same. Once the include directive has been processed during the translation phase, the main JSP is unaware that part of its contents have come from another file. The entire translated file is treated as a single unit. Any changes to the main JSP will initiate the translation phase and then compilation phase again and hence the specified is included again. So, any modification in the included JSP will not get reflected unless the main JSP is also changed.