struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schachter, Michael" <>
Subject Volunteer: File Upload/ Multipart form handling
Date Tue, 03 Oct 2000 19:09:52 GMT
I'd like to volunteer to create a more abstract way of handling file uploads
through struts, basically through creating a new
"org.apache.struts.action.MultipartActionForm" interface.

People implementing form action classes with "multipart/form-data" enctypes
would implement this class instead of "ActionForm".  They'd declare the
usual setter and getter methods for their text form entries, and declare
setter and getter methods for inputs of type "file", the getter methods
returning an object of type "File", and the setter methods taking a
parameter of type "File".

on jsp page:

<struts:form enctype="multipart/form-data" ect...>
    <struts:file name="theFile" />

in implementation of MultipartActionForm:

public File getTheFile() {;}

public void setTheFile(File theFile) {;}

I figure I'll have to make this change somewhere inside of
"BeanUtils.populate(Object, String, String, HttpServletRequest" when the
ActionForm instance is populated, but I'm not totally done with planning
this out yet.  Suggestions/constructive criticism will be appreciated

View raw message