java - Nested expression in JSP/JSTL -
I am using JSP for the scene, and Spring MVC 3.0 for the controller. In my JSP, I want to show current datetime, for which I have the following code ...
Can someone please advise how to write a nested constructor for SimpleDateFormat in the SEED SET statement?
Thank you in anticipation!
& lt; C: Set & gt;
By value
attribute
& lt; C: set var = "dateTimeDisplayFormat" & gt; Instead of tag content it can be assumed. & Lt; Spring: Message code = "display.dateFormat" /> & Lt; / C: Set & gt; & Lt; C: set var = "currentDateTime" scope = "page" & gt; & Lt;% = New Simple Data Format ($ {dateTimeDisplayFormat}) Format (New Date ())% & gt; & Lt; / C: Set & gt;
Better yet, you can see & lt; C: set & gt;
on
& lt; Spring: Messages & gt; Both should not be required. <<> & lt; Spring: Message code = "display.dateFormat" var = "dateTimeDisplayFormat" and
& lt; Fmt: formatDate & gt;
can store your results in variables:
/> & Lt; Fmt: formatDate Pattern = "$ {dateTimeDisplayFormat}" var = "currentDateTime" scope = "page" />
Comments
Post a Comment