frame 嵌套 上传jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
	<head>
		<title>upload</title>

	</head>
	
	<body>
<%     String filename = (String)request.getAttribute("filename");%>
<img src="/WebContent/images/<%=filename%>" />
<input id="filename" value="<%=filename%>">
		
	</body>
</html>

picshow.jsp

 

frame.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
	<head>
		<title>finduser</title>
	</head>
	
	<body>
	<div><iframe src="/WebContent/adduser.jsp"></div>
	<div><iframe src="upload.jsp"></div>
	<div><form action="edit.action" method="post">
			<table cellpadding="0" cellspacing="0" norder="0" align="center">
				<caption>单个用户信息1</caption>
              <tbody>
				<tr>
				<td><input name=username value=<%=request.getParameter("username")%> >
				</td>
				</tr>
				<tr>
					<td>详细信息1
					<div>
					   <s:iterator value="user">
					   <td>ID1:<input name="user.id" type="hidden" value=<s:property value="id"/>> </td>
					   <td>用户名1:<input name="user.username" value=<s:property value="username"/>></td>
					   <td>密码:<input name="user.password" value=<s:property value="password"/>></td>
					   <s:if test='username=="5"'><input type="radio" name="user.gender" value="男"  checked="checked"/>男<input type="radio" name="user.gender" value="女" />女</s:if><s:else>女</s:else>
					   </s:iterator>
					</div>
					</td>
					
				</tr>
				<tr>
					<td colspan="2"><input type="submit" value="提交"></td>	
				</tr>
				</tbody>
			</table>
		</form></div>
	</body>
</html>

upload.action
ActionContext.getContext().put("filename", imageFileName);

struts.xml
<action name="upload" class="com.xuefeng.ssh.action.UploadFileAction">
         	<result name="input" type="redirect">/listmember.action</result>
			<result name="login" type="redirect">/login.jsp</result>
			<result name="success" >/picshow.jsp</result>
         </action>


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值