tags:

views:

998

answers:

1

I would like to quickly output the current session id on a .jsp page for debugging purposes.

Is this possible? Does anyone have a JSP snippet that does this?

Thanks very much!

Edit: I found what I was looking for:

<c:out value="${pageContext.session.id}"/>
+1  A: 

If you have EL enabled in your container, you can do it without the JSTL tag - ie just ${pageContext.session.id}

An alternative for containers without EL: <%= session.getId() %>

evnafets