• 2021-04-14
    阅读下面代码片段:



    Servlet1:


    request.setAttribute("username", "张三");
    String username=(String) request.getAttribute("username");
    System.out.println("username:"+username);
    request.setAttribute("username", null);
    username=(String) request.getAttribute("username");








    System.out.println("username:"+username);


    当使用浏览器访问Servlet1时控制台会输出什么结果