In JSP 1.0 specification, they have clearly mentioned the lise of predefined
variables like request, response, out, session etc. We don't have to get it, it
will be automatically available to JSP's program.

Daryani Santosh wrote:

> You may have to get  the session object by
> HttpSession session = request.getSession();
> then call any methods you want on your session variable
>
> Santosh
>
> Sushil Singh <[EMAIL PROTECTED]> on 08/30/2000 12:52:01 PM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject:  Unable to use Session variable
>
> Hi,
>
> I am having HTTP and WebSphere running under Win NT, I am unable to use the
> session
> variables, its giving error:
> Undefined variable or class name: session out.println(ServletUtil.toString(
> session.getId() ));
>
> The code is:
>
> <%@ import="java.util.*" %>
> <%@ session="true" %>
> <HTML>
> <h1>Test Jsp</h1>
> <% for (int i=0;i < 5;i++)
>   { %>
> <p>Hello World, Current Time is <%= new Date()
> %> </p>
> <%}%>
>
> Session id is <%= session.getId() %>
> </HTML>
>
> Thanks in advance.
>
> Sushil
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to