Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Tag Issue

 
JJ Devine
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have written a custom tag but I am having problems getting it to accept a value, the code in my JSP looks like this:

<mytag:myfunc attr="${item.value}"/>

unfortunately when the value reaches the tag class it becomes the string "${item.value}" rather than the value "value" of the scoped attribute "item". I know the value exists at the time the tag is called because:

<cut value="${item.value}"/>

prints that value to the page as expected. Can anybody help?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per forum instructions, please disclose the versions of JSP and JSTL that you are using.

It sounds as if you are using an older version of JSP that does not allow the EL in template text, or that your web app is misconfigured.

The JSP FAQ has entries that deal with these situations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic