<ul class="lf"> <% Object object = session.getAttribute("user"); if(object!=null){ User user = (User)object; %> <li><a href=" "><%=user.getName() %></a><b>|</b></li> <% } %> <li><a href="favorites.html" title="我的收藏"><img class="care" src="/TeduStore/images/header/care.png" alt=""/></a><b>|</b></li> <li><a href="orders.html" title="我的订单"><img class="order" src="/TeduStore/images/header/order.png" alt=""/></a><b>|</b></li> <li><a href="cart.html" title="我的购物车"><img class="shopcar" src="/TeduStore/images/header/shop_car.png" alt=""/></a><b>|</b></li> <li><a href="help.html">帮助</a><b>|</b></li> <%if(object!=null){ %> <li><a href="ExitServlet">退出</a></li> <%}else{ %> <li><a href="login.jsp">登录</a></li> <% } %> </ul>