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

nesting tags and evaluate expressions in Struts2.0 ,alternative to bean:define ?

 
D kukreja
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a custom tag library in struts 2.0 and I want to pass a value from the action . I can get the value with <s roperty value="xyz"/> tag. But I cannor pass it to my custom tag like <custom:custom size='<s roperty value="xyz"/>'/> this doesn't work.
I tried using <s:set name="temp" value="1"/> then passing to the custom tag <custom:custom size="#temp"/> I tried all combinations of #temp , #{temp} and #{'temp'}.
This was so easy with <bean efine> in struts 1. Is there any alternative in struts 2.0
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, make sure that your TLD is defined to accept runtime expressions for that parameter.

Secondly, your custom taglib has probably not been defined to accept OGNL expressions. Therefore, you should use an EL expression instead.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic