try
HttpSession session=request.getSession(true);
session.putValue("uname","ABC");
%>
<%=session.getValue("uname")%>


vtr
----- Original Message -----
From: "Gopinath d" <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 1:00 PM
Subject: JSP problem


> hi all,
>
>
> pl have a look at the code given below.
>
> The Current Session id is: <%= session.getId()%>
> <%
>  out.println("<font color=red>Click me</font>");
>  session.setAttribute("uname","ABC");
>  out.println(session.getAttribute("uname"));
> %>
>
> //End of the program
>
>
> If i execute the program, it displays an error message stating that
>
> E:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_fst.java:78: Method
setAttribute(java.lang.String, java.lang.String) not found in interface
javax.servlet.http.HttpSession.
>                    session.setAttribute("uname","ABC");
>                                        ^
> E:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_fst.java:79: Method
getAttribute(java.lang.String) not found in interface
javax.servlet.http.HttpSession.
>                    out.println(session.getAttribute("uname"));
>                                                    ^
> 2 errors
>
> what may be the reason?
>
> Thanks in advance.
>
> Regards,
> Gopi
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to