• Post Reply Bookmark Topic Watch Topic
  • New Topic

why is jsp:attribute considered rtexprvalue ?

 
Rodrigo Alvarez
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

The JSP and jslt specs says that <jsp:attribute> can only be used to set tag attributes that are rtexprvalue.

Does anybody has an idea why? How come the following attribute value cannot be considered static :




Cheers

[ May 31, 2006: Message edited by: Rodrigo Alvarez ]
[ May 31, 2006: Message edited by: Rodrigo Alvarez ]
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the specifications again

Under "JSP.5.10 <jsp:attribute>"

You will see "The behavior of the <jsp:attribute> standard action varies depending on the type of attribute being specified, as follows:"

If the custom action attributes of type javax.servlet.jsp.tagext.JspFragment...................

If the custom action accepts dynamic attributes............

If custom action attributes that accept a request-time expression.........

If custom action attributes that do not accept a request-time expression
value the Container must use the body of the <jsp:attribute> action as
the value of the attribute. A translation error must result if the body of the
<jsp:attribute> action contains anything but template text.


So you can have the template text.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!