Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

custom tag attribute not taking runtime value  RSS feed

 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I created a custom tag which is taking 3 attribute and in it's tld file I have specified rtexprvalue for all the attributes as true. but when I am passing an el expression to the attribute, it's not evaluating it and paasing that expression as it is.
Am I missing something here?
below is my tld and jsp where I am using the tag.

tld
----------------------------------------------------------


jsp
--------------------------------

----------------------------------------------------------

with c : out, I am getting the value, but with replace, I am not, what could be the reason?

Thanks in advance

Sushma
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As it says at the top of the JSP forum, this question cannot be answered without knowing what container you are using, what version of the container, and what version of the JSTL.

The situation you are seeing is indicative of using mis-matched versions of the container and the JSTL.

We also need to know if you are declaring your web.xml using the 2.3 DOCTYPE, or the 2.4 XML Schema.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also:

<%@ taglib uri="/WEB-INF/tlds/c-1_0.tld" prefix="c" %>


why did you extract the JSTL tld from the jar file? This is just asking for trouble.
 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using J2ee 1.3, WebSphere Server 5 and jstl 1.0

web.xml is declared using 2.3 DOCTYPE.

There are other custom tags also in the same tlds, which I removed for displaying here and those tags are taking runtime values.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of JSP does WebSphere Server 5 support?

If it's not JSP 2.0, you cannot use the EL anywhere except within the attribute values of certain JSTL tags.
[ January 27, 2006: Message edited by: Bear Bibeault ]
 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's JSP 1.2

and about extracting jstl tld from jar, that's the way it is being done in my project, not my decision.
 
Saskia de Jong
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sushma Sharma:
I think it's JSP 1.2
and about extracting jstl tld from jar, that's the way it is being done in my project, not my decision.


If you're in the position to do do, you should convince your teammates to stop doing that. Its probably not a case of "doing things your own way". On the contrary, this has probably been done by someone who doesn't understand how TLDs work. A surprizingly large amount of people seem to think that the taglib URI used on JSPs actually causes an internet lookup and therefore want to 'cache' them in their project.

This is just wrong. The URI is simply a key which is declared in the meta-in dir of the taglib jar and registered by your container.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!