Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XHTML get HttpSession attribute

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Quickie question...

Is there a way to get a HttpSession attribute in XHTML, like in JSPs?

In JSPs it's just
<%session.getAttribute("welcome")%>

Is there a XHTML equivilent or do I have to create a Session Bean and access it that way?

Cheers

KS
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think about it for a minute.

XHTML = client
HttpSession = server

XHTML = general standard
HttpSession = Java only

So. no.

If you want to access the session, it must happen on the server in a servlet or JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic