dcsimg
"argument type mismatch" exception populating bean from a form on a jsp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dan_Hansen
Posted On:   Wednesday, September 26, 2001 09:20 PM

I have defined a bean that has a property (among others) called userTS of type java.sql.Date. I have a jsp that contains a maintenance form. When the page loads, it invokes to grab the elements of the previous form submit and populate the bean with them. I have a hidden element in the form corresponding to the userTS property (which is not an editable element) and have ensured that it is in the appropriate yyyy-mm-dd format. I have an overloaded setter method called setUserTS, one form of which accepts a String and converts it to a java.sql.Date by means of a valueOf call, and another that accepts a java.sql.Date directly. When the form is submitted, my hidden element code...    More>>

I have defined a bean that has a property (among others) called userTS of type java.sql.Date.



I have a jsp that contains a maintenance form. When the page loads, it invokes to grab the elements of the previous form submit and populate the bean with them.



I have a hidden element in the form corresponding to the userTS property (which is not an editable element) and have ensured that it is in the appropriate yyyy-mm-dd format.



I have an overloaded setter method called setUserTS, one form of which accepts a String and converts it to a java.sql.Date by means of a valueOf call, and another that accepts a java.sql.Date directly.

When the form is submitted, my hidden element code...


<%=ts%>' >


... causes an "org.apache.jasper.JasperException: argument type mismatch" exception (under Tomcat).



I'm sure I'm making some kind of stupid basic error, but I have as yet proven too thick to find it. Any ideas?



Dan Hansen

   <<Less

Re: "argument type mismatch" exception populating bean from a form on a jsp

Posted By:   Valeriy_Molyakov  
Posted On:   Friday, October 5, 2001 07:07 AM

I have this problem too!
But I don't have solution of it.
Please inform me of other solution.
Temporary I using String member.
Thank's !
About | Sitemap | Contact