Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using EL expresion in c:url

 
Rina Magro
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am trying to use an EL exp in the value attribute of a c:url tag as follows


This is not working for me although i read somewhere that you can put EL for parameter in the value attribute.
Can somebody give me advice on this code snippet please
thanks loads
rina
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rina

Your code is perfectly fine.
And
i read somewhere that you can put EL for parameter in the value attribute

There is nothing wrong with this statement too. It's absolutely correct.
But you are missing something in your snippet. A directive. A taglib directive. Did you get it?

Regards,
Khushhal
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use <c aram> in the body of <c:url>
for example:

<%pageContext.setAttribute("first", "hello you");%>
<c:url value="value="/jsp/test.jsp" var="urlvar">
<c aram name="firstname" value="=${first}"/>
</c:url>
 
Rina Magro
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys it had to do with the taglib directive i just changed it from

to


and it worked, last _rt made a difference in the uri attribute
regards
Rina
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic