This isn't strictly a Struts question, but it involves struts tags, and it's
driving me NUTS!
My page looks something like this:
%@ page language=java %
%@ page session=false%
%@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el %
%@ taglib uri=/WEB-INF/c.tld prefix=c %
%@ taglib
There are two types of JSP includes, static and dynamic. You appear to
be using the dynamic variety.
A statically included JSP (using jsp:directive.include) becomes part of
the same Servlet as the including JSP at JSP compilation/Servlet
generation time. A dynamically included JSP's output is
True. But even if you use the include directive, you can't split your tags. For
example, try:
split.jsp:
--
%@ page contentType=text/plain %
%@ include file=splitHeader.jspf %
Body
%@ include file=splitFooter.jspf %
splitHeader.jspf:
-
jsp:useBean id=now
Kris Schneider wrote:
Which may, in fact, be a TC bug. Just tried it on WLS 8.1 SP3 and it
worked
I don't think it's a bug.
%@ include file=splitHeader.jspf % Body %@ include
file=splitFooter.jspf %
This is a static include -- meaning that the contents splitHeader, body,
and splitFooter are
Quoting David Durham [EMAIL PROTECTED]:
Kris Schneider wrote:
Which may, in fact, be a TC bug. Just tried it on WLS 8.1 SP3 and it
worked
I don't think it's a bug.
%@ include file=splitHeader.jspf % Body %@ include
file=splitFooter.jspf %
This is a static include -- meaning
Slattery, Tim - BLS wrote:
Beats me. Clearly I don't understand the difference. The header.jsp page
needs to have a parameter passed to it, and it looks like the
jsp:include.. syntax is the only way to do that.
You can use the jsp:include syntax, but you'll have to treat the
include as a
Yes, if you want to parameterize the included JSP at runtime, you have
to do it the way you are doing it. However, you can also use a static
include, and just use c:set with page scope before you include your header:
jsp declaration
c taglib declaration
c:set var=title scope=page value=MyTitle/
7 matches
Mail list logo