I have the following form setup:
<html>
<head></head>
<body>
<form method="post" enctype="multipart/form-data" action="FileUpload">
<table>
<th>WEX SI Online Validation</th>
<tr>
<td>Step 1: Select File for Validation: </td>
<td><input name="filename" type="file"/></td>
</tr>
<tr>
<td>Step 2: Validate File:</td>
<td><input name="validate" type="button" value="Validate"/></td>
</tr>
<tr>
<td>Step 3: Download and Fix Errors:</td>
<td><input name="download" type="button" value="Download"/></td>
</tr>
<tr>
<td>Step 4: Submit</td>
<td><input name="submit" type="submit" value="Submit"/></td>
</tr>
</table>
</form>
</body>
</html>
How should I handle this? I'm using Java/JSP/Servlets but am not sure how to handle the post for the upload portion of this and than the other actions.
I think it would be best to create some kind of form controller that handled the post of the form and delegated to other servlets depending on what the user is doing. I'm not sure how to tell what the user has selected though.
Thoughts? Comments? Thanks.