Mattias...... I agree to your point of view. You have expended the explanation which was subject of question. But don't you think we are hiding the real issue. These are round-abouts of the problem when we have that much of code existing in the JSP. But my intention is to avoid that much of code (using try-catch block) entirely from the JSP, doing all kind of exception handling in the bean itself. Further using dynamic include always, is not necessary when that much of code is used in 1-2 JSPs only. For performance reasons compile time include is the better option if possible.
-ShriKant A mailing list about Java Server Pages specification and reference wrote: > > When we talk in terms of file include or <jsp:include >, the only > > difference comes up is, file include will contain the code at the > > compile time, whereas <jsp:include> use servlet chaining to use that > code. > > I'd say thats a great deal of differense, especially in this case. > > If you use the include directive, <%@ include file="included.jsp" %>, you > get COMPILE TIME include. The SOURCE CODE of the included JSP is inserted > where the directive is. If you have methods, (scriptlet) variables, bean > etc > declared on the included page you can use them on the including page. > > If you use the include action, <jsp:include page="included.jsp" />, you get > RUNTIME include. At the place of the action, an internal request goes to > the > included page and the OUTPUT of that page is inserted in the output. > Remember that the parameters of the request are available in the included > page also. > > Try to compare the source of the servlets compiled from the JSPs. The one > with <%@ include %> contains the whole included file. The one with > <jsp:include /> contains one or a few extra lines. > > Conclusion: If you have problems including lots of static output, > <jsp:include /> should do the trick. > > Also, read Hans Bergstens tip #1 here: > http://java.oreilly.com/news/jsptips_1100.html > > Mattias Jiderhamn > Expert Systems > [EMAIL PROTECTED] > > =========================================================================== > 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
