aspose file tools*
The moose likes JSP and the fly likes jsp:setProperty with java.util.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:setProperty with java.util.Date" Watch "jsp:setProperty with java.util.Date" New topic
Author

jsp:setProperty with java.util.Date

Arturo Frapp�
Greenhorn

Joined: Feb 28, 2006
Posts: 1
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:setProperty with java.util.Date
 
Similar Threads
Problem regarding jsp:useBean
Question in setProperty action
Browser back button
Bean or Servlet
org.apache.jasper.JasperException: java.lang.NullPointerException