• 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

Can a Custom Tag support jstl tag ?

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a custom Tag and I want to use C:out in that as given below

<test:input type="text" value="<c:out value=${requestScope.vb.name}" />

But it doesn't work, Can someone help me how I can use C:OUT in my Custom Tag ? Is there any way to do so or its not possible.

Thanks in Advance
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Waez Ali:
Hi,

I have a custom Tag and I want to use C:out in that as given below

<test:input type="text" value="<c:out value=${requestScope.vb.name}" />

But it doesn't work, Can someone help me how I can use C:OUT in my Custom Tag ? Is there any way to do so or its not possible.

Thanks in Advance



First, you need to set the attribute on the tld as <rtexprvalue>true</rtexprvalue>.
Then you should use directly the el expression directly.

[ August 29, 2008: Message edited by: Pedro Erencia ]
[ August 29, 2008: Message edited by: Pedro Erencia ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot use any JSP action as the attribute of another action. If you need the encoding that <c;out> performs, check out the JSTL fn:escapeXML() function.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic