Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

struts 2 text tag with dynamic expression , how?

Tags:

struts2

I need to supply the key dynamically from the action to the text tag

<s:text name="<%=talkToUsInfo.messageKey%>" />  

but the name attribute on text tag is declared as false ( not sure why ? )

How do i get something like this working without changing the tld in the jar file ?

like image 486
Surya Avatar asked Jan 05 '10 22:01

Surya


1 Answers

Take a look at OGNL

It might look like this

<s:text name="%{talkToUsInfo.messageKey}" />
like image 123
tevch Avatar answered Jan 03 '23 02:01

tevch