softlab Posted February 23, 2013 Posted February 23, 2013 Hi, I'm softlab on Johnny. In my servlet I have these lines of code: request.getSession().setAttribute("paginaUtente",paginaUtente);RequestDispatcher dispatcher = contesto.getRequestDispatcher(paginaJSP);dispatcher.forward(request,response); and the attribute is set to "../sicurezza/accesso.jsp". When the jsp page is served, there are these lines of code: String paginaUtente = (String)session.getAttribute("paginaUtente");paginaUtente = paginaUtente == null ? "" : paginaUtente.trim(); but now the attribute is empty. Why the value set in the session by the servlet is not available for the JSP? Do not they use the same session? Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.