> Can you please show how are you creating the session object??? No worries, here it is: HttpSession session = request.getSession(true); session.setAttribute("usr", request.getParameter("username"));
> Sincerely > Lic. Computer Science > Erlis Vidal Santos > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 09, 2003 10:44 AM > To: [EMAIL PROTECTED] > Subject: String added to session in servlet not available in jsp > > Hi, > > I created a session object and added a string (username) to it. > Systemout.println shows the username from the request. My page is then > forwarded to another as follows: > > RequestDispatcher disp = ctx.getRequestDispatcher(target); > disp.forward(request, response); > > On this jsp page, I have teh following code: > > String usr = (String)session.getAttribute("usr"); > out.println("User: " + usr + "!"); > out.println("Session Id: " + session.getId()); > > The page displays the session Id but not the usr. > > I'm quite baffled at why this is the case. > > looking in google for similar problems, but any help would be much > appreciated! > > Rudi > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]