Is there any tag in Struts1 tag library which can format a java.util.Date object?
In Struts 2, I can use the s:date tag, but I can’t find the Struts 1 equivalent.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nothing like that appears in the Sruts tag reference. You can however use the JSTL
fmt:formatDatetag for this. JSTL and Struts1 almost go hand in hand.Which should print like:
It uses the
java.text.SimpleDateFormatunder the hoods. Its Javadoc is more descriptive about the available patterns and styles.