GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes XHTML get HttpSession attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "XHTML get HttpSession attribute" Watch "XHTML get HttpSession attribute" New topic
Author

XHTML get HttpSession attribute

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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

Joined: Jan 10, 2002
Posts: 61298
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: XHTML get HttpSession attribute