context of el functions?

P

plue

Hi,

I have to create a xhtml attribute from dynamic content in a jsp
document, so I'm using
<jsp.element>

<jsp:element name="a">
<jsp:attribute name="href">#</jsp:attribute>
<jsp:attribute name="title"><ebp:text label="Letzte-Anmeldung"
/></jsp:attribute>
<jsp:body><ebp:text label="Letzte-Anmeldung" /></jsp:body>
</jsp:element>

The tag <ebp:text> writes via

pageContext.getOut().write(escapedText);

Above code doesn't work (NullPointer), but when I use an EL function to
output the same value like this

<jsp:element name="a">
<jsp:attribute name="href">#</jsp:attribute>
<jsp:attribute name="title">${ebp:text(pageContext.request,
"Letzte-Anmeldung")}</jsp:attribute>
<jsp:body><ebp:text label="Letzte-Anmeldung" /></jsp:body>
</jsp:element>

it works.

Where does EL functions write to? Is the mistake to write on the
JspWriter instead of what?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,183
Latest member
OrderGlycoEase

Latest Threads

Top