问答详情
源自:5-12 阶段项目

使用session方法输出属性值?

如何在login_success.jsp页面中使用session.getAttribute方法输出username和password?

提问者:creolive 2017-09-23 01:03

个回答

  • 慕侠3542704
    2019-02-12 21:52:06

    首先你要将这个值和一个键联系起来

    session.setAttribute("loginUser", loginUser.getUsername());

    用这个方法然后又是用session.getAttribute("username")这个方法输出

  • 慕妹2048866
    2017-09-23 01:08:43

    <%=session.getAttribute("username")%>
    <%=session.getAttribute("password")%>