Jsp xml syntax help needed

From: Martin Roos (martin_at_none.ee)
Date: 04/08/04

Date: Thu, 08 Apr 2004 13:28:52 +0300

I'm standing in front of a problem which i obviously can't solve.
Hope that someone can help me out on this one

in the "standard" jsp syntax setting an attribute
of output looks like this

<sometag someattr="<%=someExpression%>">

in xml syntax i can't figure out a way how to
access my variables while being in a tag ..

the xml syntax refers to <%= Xexpression %> as

so by default replacing the tags would look
<sometag someattr="<jsp:expression>someExpression</jsp:expression>">

this obviously brakes down the xml-compatibility of the jsp page
which i need to keep.

has anyone ever met this problem, what would be a possbile workaround for
the problem ?

so far i have found that in a certain way i could use the "Expression Language"
features to set it like <sometag someattr="${elExpression}">

or using the element creation tags :

<jsp:element name="sometag">
        <jsp:attribute name="someattribute"><jsp:expression>someExpression</jsp:expression></jsp:attribute>

my servlet's have to be written in xml syntax because of an complex framework
and i can't fallback on that.

  i'm open to any kind of advices :D


Relevant Pages