Skip to content

Instantly share code, notes, and snippets.

@jsfeng
Created April 12, 2012 18:25
Show Gist options
  • Save jsfeng/2369828 to your computer and use it in GitHub Desktop.
Save jsfeng/2369828 to your computer and use it in GitHub Desktop.
Struts upload JSP
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html:html locale="true">
<head>
<title>Struts File Upload Example</title>
<html:base/>
</head>
<body bgcolor="white">
<html:form action="/FileUpload" method="post" enctype="multipart/form-data">
<table>
<tr>
<td align="center" colspan="2">
<font size="4">Please Enter the Following Details</font>
</tr>
<tr>
<td align="left" colspan="2">
<font color="red"><html:errors/></font>
</tr>
<tr>
<td align="right">
File Name
</td>
<td align="left">
<html:file property="theFile"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<html:submit>Upload File</html:submit>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment