---
title: "判断session中是否为空"
author: "469957559"
date: "2013-11-20T16:05:57Z"
tags: ["Java"]
categories: ["编程语言"]
slug: "session"
draft: false
lastmod: "2013-12-25T14:11:28Z"
id: 1978014
url: "https://469957559.iteye.com/blog/1978014"
---

判断userInfo在session中是否为空

Object obj = session.getAttribute("userInfo");  
            if(obj==null){}