美文网首页
upload.jsp

upload.jsp

作者: 金厚琦 | 来源:发表于2018-11-24 16:51 被阅读0次
<%@ page language="java" contentType="text/html; charset=UTF-8"
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" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 这是个啥 -->
<base href="<%=basePath%>">
<title>Insert title here</title>
</head>
<body>

<p>${msg}</p>
 <form action="uploadservlet" method="post" enctype="multipart/form-data">
   name:<input type="text" name="name"/><br>
   email:<input type="text" name="email"/><br>
   上传文件:<input type="file" name="f1"> <br>
   <input type="submit" value="提交"> 
 
 </form>
</body>
</html>

相关文章

网友评论

      本文标题:upload.jsp

      本文链接:https://www.haomeiwen.com/subject/xrjyqqtx.html