将具体点了,axzhu(intro),给个例子也行,拜托了

解决方案 »

  1.   

    response.Redirect("http://localhost:8080/index.jsp?page='"+pageNumber+"'");
    -->
    response.Redirect("http://localhost:8080/index.jsp?page="+pageNumber);
    url方式传递参数不需要引号,把引号去掉,OK?
      

  2.   

    在一个jsp页面中,先定义变量
    String name="csdn";
    session.setAttribute("name",name);在另一个页面中,用
    String name=(String)session.getAttribute("name");
    取的。你当然也可以同时多定义几个,只不过多写几次吧了,你也可以写个封装类,把多个变量封装到一起。response.sendRedirect()应该可以传递参数的。
      

  3.   

    use RequestDispatcher.
    RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/yourpath");request.setAttribute("attr",attrvalue);rd.forward(request,response);
    return;in the client,use request.getAttribute("attr");
      

  4.   

    request.setAttribute("page",pageNumber);
    ServletContext context = getServletContext();
    RequestDispatcher dispatcher = context.getRequestDispatcher("http://localhost:8080/index.jsp");
    dispatcher.forward(request, response);
    jsp页面中
    request.getAttribute("page");