• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using EL expresion in c:url

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 242
Mac Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic