the difference between both commands is that the command A include the page
in translation time (when the servlet engine create the servlet from the
jsp). The command B is executed when the the servlet is executed. In other
words, if you use command A the servlet generated from test4.jsp will be
inserted inline in the servlet of the parent page. If you use command B the
servlet generated from parent page include un forward to test4.jsp using the
dispatcher.

Regards,
Cristian

----- Original Message -----
From: "Matt Engelbert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 2:02 AM
Subject: including files


> Anyone care to explain what exactly is the difference between these two
> commands in a jsp page:
>
> A. <%@ include file="test4.jsp" %>
> B. <jsp:include page="test4.jsp" />
>
> They seem to act exactly the same. Says here in my book ("Core Servlets
and
> JSP") that include (A) won't automatically display changes made to the
> test4.jsp without itselft being updated. However, when I run include (A)
and
> then modify test4.jsp, it picks up the changes made to test4.jsp just
fine.
> Also, my book leads to you believe that include (B) cannot include jsp
> files, only static html. Again, my tests show otherwise. I can include a
jsp
> page that contains scriptlets.
>
> What exactly is the difference between these 2 includes?
>
> Note, I am using JRun 2.3.3. My book does mention that specific servlet
> engines might implemen include implementations differently. So much for
> portability!
>
> Thanks.  - Matt
>
>
===========================================================================
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to