Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem in Date input from JSP page

  Asked By: Kuhaylah    Date: Jul 28    Category: Java    Views: 2426
  

I'm trying to get a Date input from a jsp page and store it in the
database for my struts application.

And this is the error i'm getting :
java.lang.IllegalArgumentException: argument type mismatch

the tag that i have is used :
<html:text property="invoiceDate" styleId="textdate" readonly="true"
size="28" value="${sellingInvoice.invoiceDate}"/>

And here is my formbean


public class SellingInvoiceForm extends ActionForm {

private String invoiceDate;
public String getInvoiceDate() {
.................
}

public void setInvoiceDate(String invoiceDate) {
..............
}
}

and the DTO
public class SellingInvoice {

private Date invoiceDate;
public Date getInvoiceDate() {
.................
}

public void setInvoiceDate(Date invoiceDate) {
..............
}
}

IS both the DTO and the bean are declared correctly? and if so, what
code should i write in the getters and setters for both of them so
that my code can goes fine without this error?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Problem in Date input from JSP page Or get search suggestion and latest updates.




Tagged: