• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Apache Commons Custom Converter Implementation

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Struts 1.3.10 and am trying to convert a String (the JSP) into a Calendar (the bean). I am thinking I need to create a custom converter that is going to extend org.apache.commons.beanutils.converters.DateTimeConverter and somehow overwrite convertToType??

I basically need help on what class/method to override?? AbstractConverter or DateTimeConverter?

And how to implement it? Where do I register it ??


Any help would be appreciated.

jennifer
 
Jennifer Moran
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I got it. It was way easier than I thought.

I just added this code to my contextInitialized



and it seems to work so far!!

Jennifer
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic