Quickly display session id in .JSP?

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

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

Many thanks!

Edit: I found what I was looking for:

<c:out value="${pageContext.session.id}"/>
+3
source share
1 answer

If you enabled EL in your container, you can do this without the JSTL tag, that is, just $ {pageContext.session.id}

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

+13
source

Source: https://habr.com/ru/post/1704588/


All Articles