response.Redirect("http://localhost:8080/index.jsp?page='"+pageNumber+"'")? 将具体点了,axzhu(intro),给个例子也行,拜托了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 response.Redirect("http://localhost:8080/index.jsp?page='"+pageNumber+"'");-->response.Redirect("http://localhost:8080/index.jsp?page="+pageNumber);url方式传递参数不需要引号,把引号去掉,OK? 在一个jsp页面中,先定义变量String name="csdn";session.setAttribute("name",name);在另一个页面中,用String name=(String)session.getAttribute("name");取的。你当然也可以同时多定义几个,只不过多写几次吧了,你也可以写个封装类,把多个变量封装到一起。response.sendRedirect()应该可以传递参数的。 use RequestDispatcher.RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/yourpath");request.setAttribute("attr",attrvalue);rd.forward(request,response);return;in the client,use request.getAttribute("attr"); request.setAttribute("page",pageNumber);ServletContext context = getServletContext();RequestDispatcher dispatcher = context.getRequestDispatcher("http://localhost:8080/index.jsp");dispatcher.forward(request, response);jsp页面中request.getAttribute("page"); session.close()和releaseSession(session)的区别 tomcat可以正常启动,自带的例子也能运行,但是我把自己的jsp也放在ROOT后不能运行 语法不出错,只是为什么返回的是只有1条记录,而且把这条搜索出来的记录删除,则返回无记录 请问下面的效果是怎么实现的呢??好像一直和服务器有连接啊 请问structs标记库中html:text中怎样使用css 怎么安装tomcat的admin模块 各位高手,大侠,请进来指教,十万火急,谢谢 关于网上教学的问题 简单问题 再散分 高难度问题,思考ing………… 关于jsp页面传递参数的问题,急!
-->
response.Redirect("http://localhost:8080/index.jsp?page="+pageNumber);
url方式传递参数不需要引号,把引号去掉,OK?
String name="csdn";
session.setAttribute("name",name);在另一个页面中,用
String name=(String)session.getAttribute("name");
取的。你当然也可以同时多定义几个,只不过多写几次吧了,你也可以写个封装类,把多个变量封装到一起。response.sendRedirect()应该可以传递参数的。
RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/yourpath");request.setAttribute("attr",attrvalue);rd.forward(request,response);
return;in the client,use request.getAttribute("attr");
ServletContext context = getServletContext();
RequestDispatcher dispatcher = context.getRequestDispatcher("http://localhost:8080/index.jsp");
dispatcher.forward(request, response);
jsp页面中
request.getAttribute("page");