2

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.

2
  • question is not clear what you trying to achieve here.provide more details Commented Feb 2, 2012 at 10:21
  • 1
    Have you tried <s:property value="new Date().getFullYear"/> and if so why do you need to store the current year in property file? Anyways if that gives the expected result you can set it into a parameter and would probably be a lot easier to read in a jsp. Commented Feb 2, 2012 at 17:50

1 Answer 1

1

I have tried and the right syntax is:

<s:property value="%{new java.util.Date().fullYear}" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.