You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/07/12 10:33:46 UTC
DO NOT REPLY [Bug 10683] -
some problems with JSP documents in xml syntax
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10683>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10683
some problems with JSP documents in xml syntax
Andreas.Junghans@fh-karlsruhe.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|some problems with JSP |some problems with JSP
|documents in xml syntax |documents in xml syntax
------- Additional Comments From Andreas.Junghans@fh-karlsruhe.de 2002-07-12 08:33 -------
I've had similiar problems, and this is what I found out and did:
a) treatment of xml comments
It's not explicitly mentioned in the spec how to treat comments. I think this
is a spec bug. Also, JSP 2.0 public draft shows no signs of clearing that up.
My workaround was to split all pages in two. One of them generates all
JavaScript (in non-XML syntax) and is included from the other (in XML syntax).
Ugly, but working.
b) treatment of mixed element content when taglib elements are involved
Can't say anything about that, sorry.
c) attribute expression evaluation
This is a very disturbing spec bug IMHO. Attributes of the form "%= ... %" are
only evaluated in standard or custom actions, but _not_ in ordinary XML tags
(see sections JSP.2.13.1 and JSP.5.2.9). This means that there is *no way* to
dynamically create the value of XML tag attributes using the XML syntax!
There are mainly two workarounds:
1.) Create custom tags to replace all tags the attribute values of which must
be dynamically generated (very painful).
2.) Parse the attributes yourself (slightly less painful than 1).
In my case, I created a custom tag that can wrap around any body content and
parses the "%= ... %" syntax. Of course this leads to new problems like slower
performance, escaping issues, limited supported syntax inside "%= ... %" etc.
I've already sent a comment about this to jsp-spec-comments@eng.sun.com, but
that seemed to have been routed to /dev/null :-( Also, JSP 2.0 public draft
doesn't seem to care any more for this than 1.2. _Maybe_ you can use the new
Expression Language (EL) to generate XML attribute values, but the way it's
expressed in the spec leaves plenty of room for interpretation (sections
JSP.2.2 and JSP.2.3).
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>