File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes XHTML get HttpSession attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 56191
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: XHTML get HttpSession attribute
 
Similar Threads
Adding additional element attributes
XSL Generating HTML
Form "action" issue / javascript question
session, mock, p 274 - 7 c - is correct?
HttpSession Object Persist Across Restart