日期:2014-05-18  浏览次数:20731 次

struts 上传问题求救
我一个新增页面,比如里面一个text   ,然后有button,text填入值,然后点击button连接到上传的页面,如何在上传的页面提交后返回新增的页面,切新增页面里text   ,还是刚才填的。

------解决方案--------------------
request先取值 再传到下一个页面中
------解决方案--------------------
新增页面;

function toUpload(){
open( ' <%=realpath%> /jsp/admin/bulletin/bulletinupload.jsp ', 'Detail ', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=100,height=100 ');

}

tr>
<td align= "right " bgcolor= "EFFDFF "> 附件: </td>
<td height= "23 " bgcolor= "#FFFFFF "> <input type= "button " name= "filename " value= " " size= "40 " onClick= "toUpload() "> </td>
</tr>
上传页面:


<%--
User: Administrator
Date: 2007-5-14
Time: 13:53:20
--%>
<%@ page import= "java.util.List "%>
<%@ page import= "java.util.HashMap "%>

<%@ page contentType= "text/html;charset=GBK " language= "java " %>
<%@ taglib uri= "/WEB-INF/struts-bean.tld " prefix= "bean " %>
<%@ taglib uri= "/WEB-INF/struts-html.tld " prefix= "html " %>
<%@ taglib uri= "/WEB-INF/struts-logic.tld " prefix= "logic " %>
<%@ taglib uri= "/WEB-INF/bcinfo.tld " prefix= "bcinfo " %>
<%@ taglib uri= "/FCKeditor " prefix= "FCK " %>
<%
String realpath = request.getContextPath();
%>
<html>
<link href= " <%=realpath %> /css/style.css " rel= "stylesheet " type= "text/css ">
<head> <title> </title> </head>
<body leftmargin= "0 " topmargin= "0 " marginwidth= "0 " marginheight= "0 ">
<script language= "JavaScript ">

function checkform() {
var flag = true;
if (document.form1.filename.value == null || document.form1.filename.value == " ") {
alert( "请选择附件! ");
flag = false;
}
if(flag){
document.form1.action = "bulletinmanage.do?method=doupload ";
document.form1.submit();
}
}


</script>
<table width= "100% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td height= "15 " align= "center " valign= "top ">
<table width= "95% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td height= "15 "> </td>
</tr>
<tr>
<td> <img src= " <%=realpath %> /images/icon9.gif " width= "15 "
height= "15 " align= "absmiddle "> <span class= "cpx12hei "> 您现在的位置:地税后台管理
&gt;&gt; </span> <span class= "cpx12lan "> 公告 </span> </td>
</tr>
<tr>
<td height= "3 " background= " <%=realpath %> /images/bg8.gif "> </td>
</tr>
<tr>
<td height= "18 "> </td>
</tr&