Hi Sufi,

Here are the basics...

To retrieve a session:
HttpSession sessionname = request.getSession();

To create a session:
HttpSession eminder_user = request.getSession(true);

To store into a session:
session.setAttribute("S_fname",S_fname);

To retrieve from a session:
String S_user = ((String)eminder_user.getAttribute("S_user"));


Cheers

Kate
[EMAIL PROTECTED]

>Hi, could you please show me how to store a variable in a session and how to

>get it in all the other pages.
>Thanks
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>
>===========================================================================

>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