mini
mini

Reputation: 545

how to use javascript variable in struts2 param tag

I want to use current year value in properties file, it should be send to <s:text> tag as a parameter using <s:param> tag with new Date().getFullYear() value.

Upvotes: 2

Views: 1412

Answers (1)

Chat7noir
Chat7noir

Reputation: 11

I have tried and the right syntax is:

<s:property value="%{new java.util.Date().fullYear}" />

Upvotes: 1

Related Questions