开发者

how to get current system date in validation.xml in struts2

开发者 https://www.devze.com 2022-12-17 03:38 出处:网络
i want to c开发者_如何转开发ompare the date field with the current date. for that i need current date into the validation.xml file

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号