This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes nesting tags and evaluate expressions in Struts2.0 ,alternative to bean:define ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "nesting tags and evaluate expressions in Struts2.0 ,alternative to bean:define ?" Watch "nesting tags and evaluate expressions in Struts2.0 ,alternative to bean:define ?" New topic
Author

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

D kukreja
Ranch Hand

Joined: Jan 29, 2008
Posts: 39
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: nesting tags and evaluate expressions in Struts2.0 ,alternative to bean:define ?
 
Similar Threads
how to make an iterator iterate only once ?
how to start an action from a link...
ways to pass data from struts class to the jsp page
Problem in running struts application
problem with struts2...