webwork/src/main/webwork/examples FileUploadTest.java,NONE,1.1
[email protected] Sat, 18 May 2002 11:30:17 -0700
| Newsgroups | gmane.comp.java.webwork.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/webwork/webwork/src/main/webwork/examples In directory usw-pr-cvs1:/tmp/cvs-serv25625 Added Files: FileUploadTest.java Log Message: new --- NEW FILE: FileUploadTest.java --- /* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */ package webwork.examples; import webwork.action.ActionSupport; import webwork.action.CommandDriven; import webwork.action.ActionContext; import webwork.multipart.MultiPartRequestWrapper; import java.util.Enumeration; /** * Multi-part action * * @author Matt Baldree ([email protected]) * @version $Revision: 1.1 $ */ public class FileUploadTest extends ActionSupport implements CommandDriven { private String[] severityList = {"Trivial", "Minor", "Major", "Critical"}; private String description; private String severity; // Public -------------------------------------------------------- public String[] getSeverityList() { return severityList; } public String getSeverity() { return severity; } public void setSeverity(String severity) { this.severity = severity; } public String getDescription() { return description; } public void setDescription(String description) { if ("".equals(description)) { throw new IllegalArgumentException("Description is required."); } this.description = description; } // Public -------------------------------------------------------- public String doExecute() throws Exception { log.debug("description=" + description); log.debug("severity=" + severity); try { Enumeration names = ActionContext.getContext().getMultiPartRequest().getFileNames(); while (names.hasMoreElements()) { log.debug(names.nextElement()); } } catch (Exception e) { } return SUCCESS; } } _______________________________________________________________ Hundreds of nodes, one monster rendering program. Now that's a super model! Visit http://clustering.foundries.sf.net/