jsp页面获取由SERVLET传递过来的参数问题
我在jsp页面中用videoNo   =   Integer.parseInt(request.getParameter( "videoNo ")); 
 获取了由前一个页面传递过来的参数,并由该页面向SERVLET中传递参数. 
 现在Servlet执行完成后又要将videoNo这个参数传递回该JSP页面.   
 我用了 
                   String   videoNo      =    "/Media/showVideo.jsp?video= "   +   videoNo1; 
                   response.sendRedirect(videoNo); 
 向JSP页面传递参数,但在JSP页面中无法获取这个参数的值,参数值始终为空! 
 各位大虾帮忙解决一下!在此谢过!
------解决方案--------------------用这样的试试 
 String pstrScript5 =  " <script language= 'javascript '> location.href= '/Media/showVideo.jsp?video= "+videoNo1+ " '; </script>  "; 
 out.print(pstrScript5);
------解决方案--------------------是不是可以改变一下程序逻辑,在servlet中完成你要完成的工作,将结果返回不就行了
------解决方案--------------------videoNo != videoNo1 ???
------解决方案--------------------使用request.setAttribute( " ", " ")来传参数,用request.getAttribute( " ")来接收。
------解决方案--------------------楼上的正解
------解决方案--------------------支持xiangbo520(充栋汗牛) 的做法
------解决方案--------------------xiangbo520(充栋汗牛) ( ) 信誉:107    Blog  2007-02-27 05:05:14  得分: 0         
    使用request.setAttribute( " ", " ")来传参数,用request.getAttribute( " ")来接收。        
------解决方案--------------------servletRequest.setAttribute( "tree ", treeBuilder.TreeBuilder(map, 0));   
 RequestDispatcher requestDispatcher = servletRequest.getRequestDispatcher( "tree.jsp "); 
 requestDispatcher.forward(servletRequest, servletResponse);     
 http://hi.baidu.com/lael80/blog/item/cc2d07304707c399a9018e5e.html
------解决方案--------------------String videoNo  =  "/Media/showVideo.jsp?videoNo= " + videoNo1; 
------解决方案--------------------xiangbo520(充栋汗牛) ( ) 信誉:107    Blog  2007-02-27 05:05:14  得分: 0      
    使用request.setAttribute( " ", " ")来传参数,用request.getAttribute( " ")来接收。        
------解决方案--------------------request.getParameter( "videoNo ");取的是对象,必须先转成String 然后再转int  
  For Example: 
 videoNo= Integer.parseInt((String)request.getParameter( "videoNo "); 
------解决方案--------------------类型转换问题吧.   
 《我在jsp页面中用videoNo = Integer.parseInt(request.getParameter( "videoNo "));》   
 这里你的videoNo是一个INT类型了已经 
 而 
 《String videoNo  =  "/Media/showVideo.jsp?video= " + videoNo1;》 
 你这里是甚么意思呢?如果是指将上边的videoNo作为下边的videoNo1则会出现问题 
 你本身的代码没注意检查一下先 
------解决方案--------------------这样写 
 videoNo = Integer.parseInt(request.getParameter( "video ")); 
 不是 
 videoNo = Integer.parseInt(request.getParameter( "videoNo "));   
------解决方案--------------------你没有接收servlet传递的参数的代码,怎么能接收到参数,而且感觉这个程序的逻辑有问题