Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can a Custom Tag support jstl tag ?

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
Marshal
Posts: 67416
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic