When do we actually need to use the jsp:include instead of file include. As I think in all possible scenerio we can use file include. The problem is I never changed the included file. It just contains the code for no caching and I never needed to change it. Then why does it work using jsp:include but does not work with file include.
Thanks, -ShriKant A mailing list about Java Server Pages specification and reference wrote: > From: Jaime Barnett <[EMAIL PROTECTED]>@JAVA.SUN.COM on 12/12/2001 08:22 > AM MST > > Please respond to A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > cc: > Subject: Re: Usage of jsp:include versus file include > > What is happening is that <@% include file=""> is included at translation > time vs. <jsp:include page=""> is included at request. If the included > file changes , using <@% include file="">, then the files that use the > include need to be resaved. Hopes this helps. > Jaime > -----Original Message----- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of ShriKant Vashishtha > Sent: Wednesday, December 12, 2001 7:52 AM > To: [EMAIL PROTECTED] > Subject: Re: Usage of jsp:include versus file include > > I am sorry if it troubles but I am forced to repeat my query. I used to > think > that it is always better to use static include in the JSP instead of using > jsp:include. But now this problem bothers me. > > Please advice.......... > -ShriKant > > A mailing list about Java Server Pages specification and reference wrote: > > > From: ShriKant Vashishtha <[EMAIL PROTECTED]>@JAVA.SUN.COM on > > 12/12/2001 03:43 PM > > > > Please respond to A mailing list about Java Server Pages specification > and > > reference <[EMAIL PROTECTED]> > > > > To: [EMAIL PROTECTED] > > cc: > > Subject: Usage of jsp:include versus file include > > > > Hi All............. > > > > For caching I am using the following code and am putting in a common JSP > > which > > could be included in different JSPs. > > > > response.setHeader("Cache-Control","no-cache"); //HTTP 1.1, > > response.setHeader("Pragma","no-cache"); //HTTP 1.0, > > response.setDateHeader ("Expires", 0); //prevents caching at the proxy > > server > > > > If I use <%@ include page file="sample.jsp"%> > > the purpose does not get solved and caching of the pages occurs but when > I > > use > > jsp:include directive it does work properly. > > > > What is the difference and why is it happening....... > > > > Thanks, > > -ShriKant > > > > > =========================================================================== > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com