Struts2实现文件上传(一)

来源:互联网 发布:微信假转账软件 编辑:程序博客网 时间:2024/04/29 13:27

Struts2实现文件上传


文件上传成功后结果页面

result.jsp:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%@ taglib prefix="s" uri="/struts-tags" %><%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>上传文件后</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">  </head>    <body>            用户名:<s:property value="username"/><br>           密  码:<s:property value="password"/><br>           文  件:<s:property value="fileName"/>  </body></html>


1 0
原创粉丝点击