zoukankan      html  css  js  c++  java
  • hello2 source analysis

    String username = request.getParameter("username");          ||通过url或者form传递过来的值赋值给username,比如说username是客户端用户输入的内容,然后把这个内容赋值给username.

     

                if (username != null && username.length()> 0) {             ||判断值是否为空并且长度大于0

                    RequestDispatcher dispatcher =

                        getServletContext().getRequestDispatcher("/response");            ||获取jsp上下文里边存储了各变量的信息(值),把一个命令发送到浏览器,让浏览器对指定的URL提出请求

     

                    if (dispatcher != null) {

                        dispatcher.include(request, response);

                    }                             ||如果接收到的客户端的请求不为空时,记录保留request和response,以后不能再修改response里表示状态的信息。

       请求重定向转发到指定URL "/"代表相对与web应用路径。用include()方法将HTTP请求转送给其他Servlet后,被调用的Servlet虽然可以处理这个HTTP请求,但是最后的主导权仍然是在原来的Servlet。

     

  • 相关阅读:
    人生苦短之我用Python篇(遍历、函数、类)
    Python基础篇
    OSPF 配置
    RIPng 知识要点
    RIP 知识要点
    Cisco DHCP 配置要点
    python读取mat文件
    theano提示:g++ not detected的解决办法
    Can Microsoft’s exFAT file system bridge the gap between OSes?
    matlab 大块注释和取消注释的快捷键
  • 原文地址:https://www.cnblogs.com/ting-3/p/10588005.html
Copyright © 2011-2022 走看看