I want to store form values in Database using struts
My form Bean:

```
import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;
    public class TeacherForm extends ActionForm {

    private String tfastname;
    private FormFile teacherImage;  
    private FormFile teacherprofile;

    public String getTfastname() {

        return tfastname;
    }

    public void setTfastname(String tfastname) {
        this.tfastname = tfastname;
    }

    public FormFile getTeacherImage() {
        return teacherImage;
    }

    public void setTeacherImage(FormFile teacherImage) {
        this.teacherImage = teacherImage;
    }

    public FormFile getTeacherprofile() {
        return teacherprofile;
    }

    public void setTeacherprofile(FormFile teacherprofile) {
        this.teacherprofile = teacherprofile;

    }

```

Below is the jsp:

```
<form action="teacherregistration.html"  enctype="multipart/form-data">
            <input type="hidden" name="method" value="teacherregister"></input>
                       <table class="tablecss" cellspacing="3" cellpadding="3">
                    <tr>
                        <td align="right" valign="middle" width="10%"><label
                            class="LblDialog">First Name</label></td>
                        <td><input type="text"  name="tfastname" id="fname"
                                class="textBoxInDialog"/></td>

                    <tr>    

                    <td align="center" valign="middle" width="10%"><label
                         class="textBoxInDialog">Upload Profile</label></td>
                    <td align="center" valign="middle" width="10%"><input
                            type="file" id="teaprofile" name="teacherprofile"/></td>
                    <td align="center" valign="middle" width="10%"><label
                         class="textBoxInDialog">Image</label></td>
                    <td align="center" valign="middle" width="10%"><input
                            type="file" id="teaImageId" name="teacherImage" /><img
                            id="imagePreview" src="#" alt="your image" width="70px"
                            height="70px"/></td>    
                </tr>

                </table>
                <br />
                                <table id="parentReg" cellspacing="3" cellpadding="3" width="100%">
                    <tr class="odd">

                        <td colspan="3"><center>
                                <input type="submit" class="submitButton" id="buttonID"></input></td>
                    </tr>

```

In configuration file:

```
<form-bean name="teacherregistorform" type="com.centris.campus.forms.TeacherForm" />

<action path="/teacherregistration"
            type="com.centris.campus.actions.TeacherRegistrationAction" input="/JSP/Teacher/TeacherRegistration.jsp" parameter="method"
            name="teacherregistorform" scope="request">
            <forward name="teacherLogin" path="inAdminTeacherRegistration"/>
        </action>

```

In Action class:

```
import org.apache.struts.upload.FormFile;

    public ActionForward teacherregister(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws Exception
        {

            TeacherForm tform=(TeacherForm)form;
            formFile = tform.getTeacherprofile();
              System.out.println("tfastname-----"+tform.getTfastname());

    }

```

Here am using log4j also when i click on submit button i will get below error:

```
Caused by: java.lang.IllegalArgumentException: Cannot invoke com.centris.campus.forms.TeacherForm.setTeacherprofile on bean class 'class com.centris.campus.forms.TeacherForm' - argument type mismatch - had objects of type "java.lang.String" but expected signature "org.apache.struts.upload.FormFile"
    at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2181)
    at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2141)
    at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1948)
    at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2054)
    at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1015)
    at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
    at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:473)
    ... 25 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2155)
    ... 32 more

```

please give me any solution how to solve this problem.
This is helpful for me.