File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Tag Parameters as values from other Custom Tags

 
John Brumbaugh
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Stephen Pride
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic