⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multipart.xtp

📁 解压在c盘
💻 XTP
字号:
<s1 title="Multipart Forms and File Uploading"><p>Multipart forms let browsers upload files to the website.  They alsohave better handling for internationalization.</p><p>Default form handling uses the application/x-www-form-urlencodedcontent type. Multipart forms use the multipart/form-data encoding.</p><example title='form.html'>&lt;form action="multipart.jsp" method="POST"      enctype="multipart/form-data">&lt;input type="file" name="file">&lt;br>&lt;input type="submit">&lt;/form></example><p>Resin's file uploading stores the uploaded file in a temporarydirectory.  A servlet can get the filename for the temporary file byretrieving the form parameter.  In the example,<var/getParameter("file")/> gets the filename.</p><p>Servlets will generally copy the contents of the file to itspermanent storage, whether stored on disk or in a database.</p><example title="multipart.jsp">&lt;%String fileName = request.getParameter("file");FileInputStream is = new FileInputStream(fileName);int ch;while ((ch = is.read()) >= 0)  out.print((char) ch);is.close();%></example></s1>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -