• 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

Custom Tag Parameters as values from other Custom Tags

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to have the parameter of a custom tag be filled by another custom tag? I thought you could do it, if you set the tag's attribute that you want to be able to have the content poopulated by a custom tag retexprvalue item to true. But I get the same error when I do that as when I do not have that there.
Here is an exampl of what I am trying to do with the relevant TLD snippets below as well.


TLD File:

[ January 09, 2002: Message edited by: John Brumbaugh ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, which App server are you using? What is the error message you're getting?
The JSP 1.2 spec doesn't come out and say this is legal or not, the only relative line I could find was this:

JSP7.5 Validation
There are a number of reasons why the structure of a JSP page should conform to some validation rules:
* Request-time semantics: eg. a subelement may require the information from some enclosing element at request-time


So... according to that, it seems as though its possible... but of course it also seems up to the interpretation of the Application Server Developer.
 
John Brumbaugh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Apache Tomcat 4.0.1 and the error message that I am getting is:

I know it is possible if I use scriptlets and not custom tags, but we are trying to separate code from presentation, and we want to have no JSP Scriptlet tags in the presentation files.
[ January 09, 2002: Message edited by: John Brumbaugh ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like TomCat is getting confused by all the <'s in the code and isn't parsing it correctly (which is what I suspected)

Actually... now that I think about it... I don't know if it is possible... 'cause the above isn't valid XML code...
Anyone else have any ideas?
[ January 09, 2002: Message edited by: Jessica Bradley ]
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm relatively new with JSP custom tags, but it would seem like a nested tag would work for this situation. Something like ...

But like I said, I'm still trying to figure this out myself.
reply
    Bookmark Topic Watch Topic
  • New Topic