Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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

custom tags for dynamic values inside JSTL tags

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1st case - custom tags for dynamic values inside JSTL tags:


Question 1: is this allowed ?
I believe the Taglib standard does not allow nesting custom tag inside the
attribute of another custom tag.
Am i right or wrong ?

-----------------
2nd case - custom tags for dynamic values inside other custom tags:

Question 2 : is this allowed ?
[ December 01, 2006: Message edited by: Max Fernandes ]
 
author
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Max,

The answer to question #1 is "no, you cannot have custom tags inside of attributes of JSTL tags". However, there is a mechanism that permits this type of functionality by using the <jsp:attribute> standard action. See JSP spec for details. NOTE: this is not on the SCWCD exam.

The answer to question #2 is the same as for #1. No tags allow nested tag calls in the text of attributes: not custom tags, not JSTL (which are also custom tags), and not standard tags. "You just can't do it," Frank Zappa (Dinah-Moe-Hum).

-Bryan
 
Celinio Fernandes
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Bryan, thanks very much for these explanations.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic