You can add information in the page, request, session, application objects.
The page object is available just for the current invocation. Request
objects are bound to a specific request. Session attributes are available
only to servlets and jsps in that session. Application objects are most
persistent.

Since you are working with user information you will most likely want to use
the session object. To get the current session associated with the request
you should use the getSession() method and then the setAttribute() method to
bind an object to that session. For instance:

HttpSession session = request.getSession();
session.setAttribute("name", someObject);

Justy

----- Original Message -----
From: "Mendez Yanes JI" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 9:36 AM
Subject: Context


> Hello again,
>
> I have a little JSP/Tomcat application, but I haven't used context. I
> guess that will be very useful to keep valid information for an
> user/session.
>
> How can I add info to context ?
>
> Thanx in advance
> Jose Ig
>
> PS.- IMPORTANT. There are any moderator, owner or master who I can
> mail to when nobody answer a question, because i.e. it is a simple
> question or a really difficult one. THANX AGAIN.
>
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
>
>
===========================================================================
> 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://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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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