how to get current system date in validation.xml in struts2
i want to c开发者_如何转开发ompare the date field with the current date. for that i need current date into the validation.xml file so that i can compare it how can i implement it i m using struts2
Thanks
You might be able to get something working with the expression validator. It lets you specify an OGNL expression. Combined with OGNL's ability to call static methods, you might be able to hack something together like:
myDate < @java.util.Calendar@getInstance().time
I'm not sure this would actually work though, as I've never tried it.
精彩评论