Travis McCauley wrote:
I think I was confused because I took the taglib directive out of a page
that is only included by other pages. I can do that and the page still
works. Is it not supposed to? I know the page is re-compiling.
If you include a page with the include directive (<%@ include file="..." %>)
it's merged with the including page and becomes part of the same
"translation unit". This means it shares all taglib declarations used in
the including page, so yes, in this scenario, declaring the tag library
in the included page as well is redundant.
However, if you include the page with the include action (<jsp:include
page="..." />), the included page must be self sustained. It's converted
to its own servlet and at runtime, it's executed and only the _result_
is included in the including page. In this scenarion, the included page
must declare all tag libraries it uses.
Hans
Travis McCauley wrote:
Hello,
I am still new to jsp and jstl and I'm a little confused about why it
is not necessary to add a taglib directive at the top of a page for
the standard taglib like:
<%@ taglib prefix = "c" uri = "http://java.sun.com/jstl/core" %>
You do need to add this taglib directive. What makes you think you
don't?
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
Hans Bergsten <[EMAIL PROTECTED]>
Gefion Software <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at <http://TheJSPBook.com/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>