I ve a question on JSP directives.
I am using a Include JSP directive to include a page "copyrights.jsp". The changes in the copyrights.jsp page immediately reflects during the run time, why?
thanks in adv..
[ August 30, 2005: Message edited by: Bear Bibeault ]
I guess it is because of dependency of your JSP on copyrights.jsp. JSP engine has considered your JSp & copyrights.jsp as a translation unit & as timestamp of one of the entity has changed JSP engine has retranslated entitr unit one more time so you are getting updated one.
Many servers now check the timestamp on included JSPs and will re-generate and re-compile underlying servlet if they get updated.
Originally posted by Shrinivas Mujumdar:
I don't think so in generated servelt there will be a pointer kind of information about from which page response should be included & as servlet is multithreaded there is no need to have different servlet instances for include action tag.
Each of the JSPs (the parent and included page) will result in it's own generated servlet class.
The two will be executed at run time and their output merged.
With the include directive <%@... the sourc of the two JSPs will be combined when generating the servlet code and only one servlet class will result.