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

html,jsp间传参问题
下载遇到一点问题,现做了一个传值页面,通过这个值,在下一个页面可以显示链接字,点击链接字从数据库得到路径下载
取文件名部分代码FileName.jsp
conectdatabaseselect   ch1=new   conectdatabaseselect();
            str=ch1.filename(file);
            %>
                  <jsp:forward   page= "download.html?stra= '+str+ '&value=file "/>
(file是传过来的引数,str为链接字显示名称,可以取到,但作为参数如何传到下载页面download.html)
download.html
<script   type= "text/javascript ">
String   filename= " ";
filename=reques.getParameter( "stra ");
int   id=0;
id=reques.getParameter( "value ");
document.f1.a.value=id;  
</script>
  <form   name= "f1 ">  
<a   href= "do_download.jsp?us=${id} "> '+filename+ ' </a>
do_download.jsp为下载执行界面,同样为传值问题

------解决方案--------------------
download.html是静态页面怎么还能用reques.getParameter( "stra ");?