日期:2014-05-16  浏览次数:20401 次

struts2 JSP取session问题

??? String?????? user?????? =???? ((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getLoginID();????????????? String?????? userID?????? =???? ((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getUserID();
?????????????? //out.println(user+","+userID);
??? %>
???????
???? <s:if test='%{#session.memberInfo!=null}'>
??????? jjjjjjjjj
?????? <%=((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getLoginID() %>???? </s:if>--%>
?????? <s:if test='%{#session.memberInfo==null}'>
??????? kkkkkkkkkkkk
??????? </s:if>

?? ?????? <s:if test='%{#session.memberInfo!=null}'>
?? ??????? <a href='${pageContext.request.contextPath}/login/<%=((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getLoginID() %>.html' target="_blank"><%=((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getLoginID() %>!</a>欢迎来到商圈网!
???????????????? <input type="hidden" id="userID" name="userVO.userID" value='<%((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getUserID(); %>' />
???????????????? [<a id="exitPath" href="#">退出</a>]
????????????????? <script>
????? ??var exitPath = document.getElementById('exitPath');
????? ??exitPath.href = '${pageContext.request.contextPath}/member/quit_'+self.location.href+'/<%=((com.mb.manage.vo.UserInfoVO)session.getAttribute("memberInfo")).getLoginID() %>.html';
??????? </script>
???????????????? </s:if>
???????????????? <s:if test='%{#session.memberInfo==null}'>欢迎来到商圈网![<a href="${pageContext.request.contextPath}/login.html" target="_blank">请登陆</a>]</s:if>? | <a href="${pageContext.request.contextPath}/register.html">注册</a></p>