• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:setProperty with java.util.Date

 
Arturo Frapp�
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I'm just trying to set a pojo with several Date fields.

At JSP side:

<jsp:useBean id="work" class="mx.colmex.pub.Work" scope="request">
<jsp:setProperty name="work" property="*" />
</jsp:useBean>

From the form I write: 01/12/2006 (December 1st. 2006)

Then when I submit the form I get:
org.apache.jasper.JasperException: jsp.error.beans.property.conversionorg.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:359)org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284)
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the best way to do this would be to make a custom Date class extending the PropertyEditorSupport, and implementing the setAsText method.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic