📄 upload.jsp
字号:
<%@ page import="org.apache.struts.action.*,
java.util.Iterator,
org.ug.sztz.webview.structs.forms.UploadForm,
org.apache.struts.Globals" %>
<%@ taglib uri="/WEB-INF/tags/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tags/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tags/struts-logic.tld" prefix="logic" %>
<html>
<head>
<title>File Upload Example</title>
</head>
<body>
<logic:messagesPresent>
<ul>
<html:messages id="error">
<li><bean:write name="error"/></li>
</html:messages>
</ul><hr />
</logic:messagesPresent>
<!--
The most important part is to declare your form's enctype to be "multipart/form-data",
and to have a form:file element that maps to your ActionForm's FormFile property
-->
<html:form action="upload.do" enctype="multipart/form-data">
<p>Please enter some text, just to demonstrate the handling of text elements as opposed to file elements: <br />
<html:text property="theText" /></p>
<p>Please select the file that you would like to upload: <br />
<html:file property="theFile" /></p>
<p>Set the file type:<br />
图片:<html:radio property="theType" value="student"/>附件:<html:radio property="theType" value="attachment"/></p>
<p>
<html:submit />
</p>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -