• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Struts 2 - DateTimePicker

 
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to implement the 'easy to use' datetimepicker (or datepicker) for a Struts 2 application based on this example and I'm getting the following error when I use the tag:

org.apache.jasper.JasperException: /MyApp.jsp(21,1) No tag "datetimepicker" defined in tag library imported with prefix "s"

I opened up the struts-tags.tld library for 2.1.6 and I don't see the tag defined. I'm guessing I'm missing a library but I can't tell which one.
 
Scott Selikoff
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I found the solution... I added the "struts2-dojo-plugin-2.1.6.jar" to my class-path and I added a second tag library:

<%@taglib prefix="d" uri="/struts-dojo-tags"%>

I must have 'missed' the documentation that covered these steps.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The S2.1 series release notes discuss the move to a Dojo tag plugin and the Ajax tag documentation includes the same information. As has been noted by others here on JavaRanch, RoseIndia isn't always your best bet for reliable, current information.
 
Scott Selikoff
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RoseIndia seems to come up with a lot of examples in google. Either way I'm still having trouble with the datetimepicker. The code compiles and runs, but it doesn't do much, as in, I see "Enter Date:" but that's about it. What other config do I need to add/install to make it work?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Number of hits != useful.

Do you have the <sx:head/> tag in your pages <head> section? (Also in the S2 docs.)
 
Scott Selikoff
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, that did it. I saw an empty tag when the include ajax theme was taken out, and just 'assumed' it wasn't do anything anymore. My bad.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic