• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Illegal Attribute Value

 
Ricardo Cortes
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone tell me why the following attribute value is illegal?
<mytags:tag value="<%="hi!"%>" />
I am thinking it's because the double quotes surround the text "hi!" are not escaped but I am not sure.
Also, why is the above not legal while the following is legal?:
<x:tag value='<%= "hi!" %>'/>
[ May 03, 2002: Message edited by: Ricardo Cortes ]
 
Chintan Rajyaguru
Ranch Hand
Posts: 341
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to double quotes, you should also make sure that the attribute has been specified to take request time value. This means, for this attribute, tld file should read
rtexprvalue=true
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic