session

    private String getShopNoFromSession(){
        HttpServletRequest request = ServletActionContext.getRequest();
        HttpSession session = request.getSession();
        User loginUser = (User)session.getAttribute("loginUser");
        String shop_no = String.valueOf(loginUser.getShopId());
        if(shop_no == null){
            shop_no = "-1";
        }
        return shop_no;
    }


你可能感兴趣的:(getSession)