Dear people, Does anybody know where can I obtain a Struts Tag Library or a similar example to feature input of Date, Mth and Year values via the HTML/JSP screens? The String values submitted would then be converted to java.util.Calendar or GregorianCalendar ...hopefully something like 'GregorianCalendar(int year, int month, int date)' ? FYI, the timezone and time could be just current system defaults. Thanks. Any help would be much appreciated.
Hi again Simon, it's generally held to be best practice to use a string property for all types, not just dates. In your formbean, you would then convert your original type variable into a string using the locale or fixed US locale or whatever you choose, and then in the formbean.validate() you would convert the user's date string back to date type using your own code. I've been using this code, but I haven't released it yet, so it's not been tested thoroughly:
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.