JSP实现文件上传——uploadFile.jsp
2023-09-14 08:57:41 时间
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'uploadFile.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
注册用户: <br>
<form action="upload/doupLoadFile.jsp" method="post" enctype="multipart/form-data">
用户名:<input type="text" name="userName"/><br/>
密码:<input type="password" name="userPwd"/><br/>
头像:<input type="file" name="picFile"/><br/>
<input type="submit" value="注册"/>
</form>
</body>
</html>
相关文章
- JSP九大内置对象详解
- JAVA-JSP内置对象之request对象的其他方法
- JAVA-JSP运行机制
- ssh(Spring+Spring mvc+hibernate)——showDept.jsp
- 新闻发布项目——后台JSP界面adminManage/addNews.jsp
- 新闻发布项目——后台JSP界面adminManage/adminIndex.jsp
- 新闻发布项目——后台JSP界面adminManage/editNews.jsp
- 新闻发布项目——后台JSP界面adminManage/modifyNews.jsp
- 新闻发布项目——后台JSP界面adminManage/modifyNews.jsp
- 新闻发布项目——后台JSP界面adminManage/readNews.jsp
- 新闻发布项目——后台JSP界面adminManage/readNews.jsp
- 新闻发布项目——前台JSP界面newspages/news_read.jsp
- jsp实现文件上传——douploadFile.jsp
- $.post()请求 ation请求,jsp获取的处理结果
- spring mvc: 可参数化的视图控制器(在配置中指定jsp文件)MultiActionController/SimpleUrlHandlerMapping/ParameterizableViewController
- jsp: jstl标签库
- Jsp页面里引入一个javascript文件,在jsp的onclick里怎么添加脚本文件里的方法
- JSP 原理
- BSP和JSP里的UI元素ID生成逻辑
- servlet 和 jsp
- 在jsp中显示原始html代码,不要渲染 / 在JSP页面中如何将HTML标记显示出来
- 考虑下面两个JSP文件代码片断: test1.jsp:
- JSP — 如何设置jsp中cookie的过期时间