Re: How to access Tomcat session objects directly via JavaScript?

2021-05-18 Thread leo
On 17 May 2021, at 22:19, Christopher Schultz wrote: > Leo, > > On 5/15/21 21:16, leo wrote: >> Hi Folks >> >> In a small scale personal project served by Tomcat I record things per >> logged-in user. The user is available as an attribute to Tomcat’s session >> objects. In the JSP pages I

Re: How to access Tomcat session objects directly via JavaScript?

2021-05-18 Thread leo
On 17 May 2021, at 16:41, Luis Rodríguez Fernández wrote: > Hello Leo, > > You can add your custom header in the response via the > HttpServletResponse.addHeader() [1] method. > That’s exactly what I was looking for! …However it doesn’t help much, because I have just discovered that

Re: How to access Tomcat session objects directly via JavaScript?

2021-05-17 Thread Christopher Schultz
Leo, On 5/15/21 21:16, leo wrote: Hi Folks In a small scale personal project served by Tomcat I record things per logged-in user. The user is available as an attribute to Tomcat’s session objects. In the JSP pages I retrieve the session object *through Java* like this     <%    

Re: How to access Tomcat session objects directly via JavaScript?

2021-05-17 Thread Luis Rodríguez Fernández
Hello Leo, You can add your custom header in the response via the HttpServletResponse.addHeader() [1] method. Hope it helps, Luis [1] https://tomcat.apache.org/tomcat-8.5-doc/servletapi/javax/servlet/http/HttpServletResponse.html#addHeader(java.lang.String,%20java.lang.String) El lun, 17

Re: How to access Tomcat session objects directly via JavaScript?

2021-05-16 Thread leo
Rony, Thanks for chiming! :-) >> […] In the JSP pages I retrieve the session >> object *through Java* like this >> >> <% >> HttpSession session = request.getSession(); >> ... >> user = (String)session.getAttribute("user"); >> ... >> %> >> >> Then later on

Re: How to access Tomcat session objects directly via JavaScript?

2021-05-16 Thread Rony G. Flatscher (Apache)
Leo, On 16.05.2021 03:16, leo wrote: > Hi Folks > > In a small scale personal project served by Tomcat I record things per > logged-in user. The user is > available as an attribute to Tomcat’s session objects. In the JSP pages I > retrieve the session > object *through Java* like this > >    

How to access Tomcat session objects directly via JavaScript?

2021-05-15 Thread leo
Hi Folks In a small scale personal project served by Tomcat I record things per logged-in user. The user is available as an attribute to Tomcat’s session objects. In the JSP pages I retrieve the session object *through Java* like this <% HttpSession session =