Store the session data temporary

Hi

I'm a beginner in JSP, and I started to design a webpage to ebook store site.

I have a problem with saving the session data , because i didn't want to use data base in may site. and that data will used in the later pages in the web site.

as example : if the user needed to add more than one item to his\here cart , then all that items must appeared in the page named view cart .

so please help me.....

[446 byte] By [abualmajda] at [2007-11-26 12:20:34]
# 1
> I'm a beginner in JSPThat means you need to start with the Java EE Tutorial and come back here to ask specific questions or post errors you cannot get past.
SoulTech2012a at 2007-7-7 15:10:51 > top of Java-index,Archived Forums,Socket Programming...
# 2

for u store data in a session u have

Declare session object

HttpSession session =getSession(true);

session.setAttribute("key",value);

if u want to the data added in a different u have to just

Object obj =session.getAttribute("key",value);

if(obj != null)

{

String str =(String)obj;

System.out.println("value is ===" + str);

}

bobbitoa at 2007-7-7 15:10:51 > top of Java-index,Archived Forums,Socket Programming...