Hi all, I have set a session, application var. in a JSP as follows: <% .. session.setAttribute("debugmode",String.valueOf(debugmode)); getServletContext().setAttribute("log",log); .. %> then this JSP will call a Servlet and from that Servlet I am try to use those session, application var. as follows:
Seems like a silly thing to ask, but both 'debugmode' and 'log' are variables that are in scope when you place them into the session and application contexts in your JSP?
Joined: Oct 24, 2000
yes. and within that JSP I can look up those attributes as well.
Joined: Nov 15, 2001
HttpSession session = request.getSession(false); Boolean tmpb = new Boolean((String)session.getAttribute("debugmode")); BufferedWriter log = (BufferedWriter)getServletContext().getAttribute("log") Hi, you might have found the solution, but dont you have to set the session to "true" when you "getSession". -G