Hi Manuel
This one has bitten me more times than I like to
remember. The quick answer is move to JSP 1.2 and it solves this problem -
Tomcat 4.x supports JSP 1.2.
The more detailed answer is that in JSP 1.1 there
is a problem using BodyTags which contain a <jsp:include> inside their
body. In JSP 1.1 the output of <jsp:include> is meant to go straight to
the HttpServletResponse so the BodyTag never sees the output - so even if your
code would run without throwing an exception, the XML you are trying to style
would go to the users browser and the <xsl:apply> tag wouldn't get any XML
to style.
I hit this limitation all the time, here are my 2
workarounds - both are far less than ideal and will be removed as soon as I can
develop on JSP 1.2...
1) use static includes
<xsl:apply
xsl="xsl/restaurantstable.xsl">
<%@ include file="/something.jsp" %> </xsl:apply>
In this model you can use scripting variables to
communicate between the 2 bits of JSP
2) use a seperate HTTP request to call your
'include'.
if you had a tag library to perform a http request
you could do something like this:-
<xsl:apply
xsl="xsl/restaurantstable.xsl">
<io:http url="/servlet/Restaurants">
<io:param name="State" value="<%= stateCode
%>"/>
</io:http> </xsl:apply> If you're stuck and need a tag library to do http
requests as shown above, I posted an "io tag library" to the taglibs-dev list
recently, though it hasn't been officially accepted yet, so use at your own
risk. Mail me privately if you like and I can send you the the tag
lib.
J.
----- Original Message -----
|
- Parameters in include tag Manuel Alzola
- Re: Parameters in include tag Pierre Delisle
- Re: Parameters in include tag Manuel Alzola
- Re: Parameters in include tag Manuel Alzola
- James Strachan