tags:

views:

254

answers:

2

hi, i want to compare 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

A: 

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.

Nate
A: 

thanx for ur reply i m new to struts so can u give me the code for that

Thanks

shakil