[jboss-user] [JBoss Seam] - Check for session attributes through EL

lightbulb432 do-not-reply at jboss.com
Thu Jan 11 20:39:57 EST 2007

If I want to see whether there's a user component in session scope, how in EL can I output the presence of a component in the session context?

I tried the following but it gives an error saying the "user" property is not found:

#{not empty sessionContext.user}
#{not empty sessionContext['user']}

I simply tried #{not empty user} but this always equals true (i.e. there is a user component existing somewhere) even though I don't know how the component is existing on the first access of the page. The JSF pages don't refer to any of the properties of "user" so it shouldn't be getting automatically instantiated...

What's the proper way to check through EL if something's been added to session scope?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000662#4000662

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000662

More information about the jboss-user mailing list