对于 index.jsp 的修改 ---之前是加入没有用户登录就是现实 登录 注册两个链接 。 否则就是现实目前登录的用户
<c:choose>
<c:when test="${empty user }">
<a href="<%=request.getContextPath()%>/login.jsp">登录</a>
<a href="<%=request.getContextPath() %>/register.jsp">注册</a>
</c:when>
<c:otherwise>
当前登录用户为:${user.userName}
</c:otherwise>
</c:choose>
对于goods_list.jsp的修改---之前是将tr td 嵌入if-else java语句块中 现在是
<c:choose>
<c:when test="${empty user }">
<a href="<%=request.getContextPath()%>/login.jsp">登录</a>
<a href="<%=request.getContextPath() %>/register.jsp">注册</a>
</c:when>
<c:otherwise>
当前登录用户为:${user.userName}
</c:otherwise>
</c:choose>