Reputation: 3805
I've got custom tag. It works properly, but not at all. My jsp
looks like:
<test:myTag>${headHunter.salary}</test:myTag>
Where ${headHunter.salary}
is some value. And tag:
public int doAfterBody() throws JspException {
String content = bodyContent.getString();
try {
JspWriter out = bodyContent.getEnclosingWriter();
out.print(content);
} catch (Exception e) {
}
return SKIP_BODY;
}
So if ${headHunter.salary}
equals 10
, tag must return the same value. But it returs only "${headHunter.salary}"
as string. Whats wrong?
UPD
taglib.tld:
<?xml version="1.0" encoding="UTF-8"?>
<taglib>
<tlibversion>1.0</tlibversion>
<shortname></shortname>
<jspversion>1.1</jspversion>
<tag>
<name>myTag</name>
<tagclass>net.babobka.blog.tags.CurrencyTag</tagclass>
<bodycontent>tagDependent</bodycontent>
</tag>
</taglib>
Upvotes: 0
Views: 242
Reputation: 279880
Get rid of
<bodycontent>tagDependent</bodycontent>
It should default the scriptless
. It seems tagDependent
prevents EL from being resolved.
Upvotes: 1