commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Smith <>
Subject process regular fields in html form
Date Fri, 15 Oct 2004 17:56:42 GMT

When we process the form data without file upload control in JSP. We can use JavaBeans in
JSP, then the following will store all the request form data to MyObjectModel object:


<jsp:useBean id="om" class="MyObjectModel" />

<jsp:setProperty name="om" property="*" />


However, when we process the form data that contains file upload, and uses commons-fileupload,
then we should approach the following, is that correct? 


if (item.isFormField())


      String name = item.getFieldName();

      String value = item.getString();


      MyObjectModel om = new MyObjectModel();

      if (name.equals("fieldName1"))


      else if (name.equals("fieldName2"))

            ad. setFieldName2(value);

      else if (name.equals("fieldName3"))





Please advise. Thanks!!


Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message