response.sendRedirect 能传值吗?

phptong 2004-10-21 11:06:42
用response.sendRedirect("new.jsp");进行页面跳转时,原页面的表单元素的值(如text,select,radio,checkbox,textarea 的value值)会传到新页面(new.jsp)中去吗?
...全文
582 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
greenfly 2005-07-26
  • 打赏
  • 举报
回复
response.sendRedirect("viewproduct.jsp?sort_id="+sort_id);
禽兽v5 2004-10-24
  • 打赏
  • 举报
回复
http://blog.csdn.net/cm4ever/archive/2004/10/20/143921.aspx
tyong 2004-10-23
  • 打赏
  • 举报
回复
要是传中文,还要转换
meetingName = new String(meetingName.getBytes("ISO8859_1"), "GBK");
tyong 2004-10-23
  • 打赏
  • 举报
回复
response.sendRedirect关post和get什么事呀
tyong 2004-10-23
  • 打赏
  • 举报
回复
可以传
要是不敢确定,可以自己试试呀
debug148 2004-10-23
  • 打赏
  • 举报
回复
混个脸熟!
umbrella1984 2004-10-21
  • 打赏
  • 举报
回复
说错了,是压进SESSION里,如果压入request你还得将这个request传递过去。
umbrella1984 2004-10-21
  • 打赏
  • 举报
回复
用GET方法把值写在URL后面,或者把值写压入request.setAttribute("key","value")
xiangbo520 2004-10-21
  • 打赏
  • 举报
回复
post方式传递的参数会被丢弃。它只能传GET方式的参数
phptong 2004-10-21
  • 打赏
  • 举报
回复
request.setAttribute("key","value")和session.setAttribute("key","value")一样吗?
greenfly 2004-10-21
  • 打赏
  • 举报
回复
response.sendRedirect("aim.jsp?name='+mname+'");
yangsm 2004-10-21
  • 打赏
  • 举报
回复
应该可以考虑用COOKIES吧!

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧