Thomas Paradies wrote:
>
> Using jswdk-1.0.1 on NT I tried to include a page dynamically with code like
> this:
>
>     <jsp:include page="<jsp:expr>my_expr_with("string_param")</jspexpr>" .../>
>
> I got a ParseException: "Attribute string_param has no value".
>
> Why? ... notice the nested double quotes! Ok, I "ecaped" the inner ones:
>
>     <jsp:include page="<jsp:expr>my_expr_with(\"string_param\")</jspexpr>" .../>
>
> Then a got an IOException: "... syntax for file names ... is wrong ..." :-(
>
> Well, altough I'm prefering the pure-XML syntax in the next step in
> troubleshooting
> I tried
>
>     <jsp:include page="<%= my_expr_with(\"string_param\") %>" .../>
>
> and ... wow, it works!!!
>
> But, what's than about the use of  <jsp:expr> tags in <jsp:include .../> ????
>
> Comments (especially from Sun :-) wanted!

I'm not from Sun, but I'm a member of the spec working group.

The XML equivalents for the scripting elements are not intended to be used
in a hand-crafted JSP page; they are intended for pages generated by tools.

To make a JSP a "pure" XML document you need to do a lot more than using
the XML equivalents, such as adding a top element, encoding all characters
in scripting elements that can cause parsing errors, etc. This is described
in the JSP 1.0/1.1 specs.

--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to