The solution from the spec worked for the use with the input taglib. I'm now having a problem with standard HTML tags, when I want to include values I have declared elsewhere in the code.
For example <jsp:declaration> String myURL = "http://www.foo.com" ; </jsp:declaration> Later in the page, I want to reference this value in constructing a URL: <a href="%= myURL%">click here</a> in the output, the substitution is not made. The output is printed exactly as it is in the JSP page. I am doing something wrong here? Thanks, August On Wednesday, February 13, 2002, at 03:25 PM, Shawn Bayern wrote: > On Wed, 13 Feb 2002, August Gresens wrote: > >> options="<%= o %>" /> >> >> With XML syntax, this won't work because the "<" and ">" characters >> are illegal in XML with attributes, and JSP chokes while attempting to >> parse it. >> >> Does anyone know how to do this? Is there a new syntax for the XML >> syntax to indicate to JSP that a reference instead of a value is being >> passed (like XSLT's "$" operator). > > Yes: "%= rtexprvalye %". > > Section 5.3.11 of the JSP specification provides the full info: > > Request-time attribute expressions are of the form <%= expression %>. > Although this syntax is consistent with the syntax used elsewhere in a > JSP page, it is not a legal XML syntax. The XML mapping for these > expressions is into values of the form %= expression %, where the JSP > specification quoting convention has been converted to the XML quoting > convention. > > Also, it's worthwhile pointing out that since JSTL's (and JSP 1.3's > likely) expression language will not rely on the rtexprvalue syntax, it > won't need this sort of escaping. In other words, your <c:forEach> tag > should work similarly under the familiar and XML views of the page. > > -- > Shawn Bayern > Author, "JSP Standard Tag Library" http://www.jstlbook.com > (coming soon from Manning Publications) > > > -- > To unsubscribe, e-mail: <mailto:taglibs-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:taglibs-user- > [EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>