• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > 编程与数据库 > Jsp编程 >

JSP跳转方式(3)

来源: www.dedecms8.com 编辑:织梦吧 时间:2012-06-28点击:

 

       例:重定向jsp

 

           

 

 

public void doGet(HttpServletRequest request, HttpServletResponse response) 

            throws ServletException, IOException { 

 

        response.setContentType("text/html"); 

        response.sendRedirect("jsp/forward.jsp"); 

 

//可传参 

 

//response.sendRedirect("jsp/forward.jsp?name=zhangsan"); 

 

            重定向servlet

 

         

 

public void doGet(HttpServletRequest request, HttpServletResponse response) 

            throws ServletException, IOException { 

 

        response.setContentType("text/html"); 

        response.sendRedirect("F"); 

        //可传递参数 

        //response.sendRedirect("F?name=zhagnsan"); 

标签: jsp 跳转方式

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1170734538@qq.com ,  QQ