tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From M Butcher <mbutch...@uswest.net>
Subject Re: EJB on Tomcat !!
Date Thu, 04 May 2000 04:37:27 GMT
Per the XML spec (http://w3.org/) your param would be illegal XML -- an XML
parser should create two text nodes and an element node from your param.

To my knowledge, you cannot escape XML tag delimiters with a backslash.

Seems like you'd have to put the param in a CDATA section... or use the
character entity encoding. I don't actually know what Tomcat will do in the
former case, and in the latter, you would most likely be responsible for
converting the entity into a character.

<param-value><[CDATA[<bar/>]]></param-value>
<param-value>&lt;bar/&gt;</param-value>

"kc.baltz" wrote:

> Not sure, but my guess is you need to put backslashes in front of the < > 's
> and remove the "'s unless you want them to be part of the string returned by
> getInitParameter().
>
> K.C.
>
> > -----Original Message-----
> > From: Christopher Stacy [mailto:cstacy@crystaliz.com]
> > Sent: Wednesday, May 03, 2000 3:25 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: EJB on Tomcat !!
> >
> >
> > I have an application parameter value that consists of some XML.
> > I want to write something like:
> >
> >       <context-param>
> >         <param-name>foo</param-name>
> >         <param-value>"<bar/>"</param-value>
> >       </context-param>
> >
> > But when I call app.getInitParameter("foo"), I get back a
> > string of length 1 (one)
> > containing only a quote (") character.
> >
> > If I leave out the quotes, and just write:
> >
> >         <param-value><bar/></param-value>
> >
> > then I don't get back anything.
> >
> > What is the XML syntax that I need to use for this kind of thing?
> >
> >
> > --------------------------------------------------------------
> > ------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

--
M Butcher
mailto:mbutcher@xleration.com



Mime
View raw message