The requirement is that the admin will select the date format from the list say
(“dd-MM-yyyy”,”d MMM yyyy”) based on the this selection all the date to be displayed should be as per the selection.
as this setting should apply throught out the application i tried saving it in a application scope using application aware . i was able to save but the problem was when trying to implement the changes
means
GlobelSetting global = new GlobelSetting();
global.setFormatDate("dd-MM-yyyy");
applicationMap.put("dateFormat", global.getFormatDate());
now trying to set the date format in date tag
<td align="left">
<s:date name="employee.dateCreated" format="#application.dateFormat"/></td>
but i get a error while displaying the error is
java.lang.IllegalArgumentException: Illegal pattern character 'p'
The “format” attribute needs to have evaluation forced: