hi siva,

I  think you have not understood the scoping parameter properly.
When  you say page scope = session, automatically the bean you created is
kept in the session container.

So if you retrieve a large amount of data and also if you get larger number
of requests , your server may go out of memory. Surely storing the data in
session works faster (obviously) but it is not very scaleable.

Kishore

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Sivakumar
Sankarasubramanian
Sent: Friday, June 09, 2000 6:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Urgent:Displaying 10 records in one page


Hi ,

I've done a similar exercise where I had to display only n number of records
from the database. In the JSP bean I declared a Vector and wrote set and get
methods for that. I also wrote a method wherein the Vector gets populated
with the resultset I get from the database .
Now things are pretty easy. I just looped the Vector in each of the pages
and displayed the correct number of records like 1-10 or 11-20 etc.
Actually the performance increased when it was stored in the bean compared
to making SQL calls everytime.
One important thing is that the page scope has to be "session"  for this to
work.
Here no session object is created. It will work fine for multiple windows

Check this in full implementation at our company website.

http://www.pharmquest.com/source/glossary/glos1.jsp?alp=A&pid=1


--------------------------------------------
Sivakumar S

PharmQuest.com Inc.
West Valley Executive Park
4030 Moorpark Ave, Suite 220
San Jose, CA 95117
Phone: (408) 984-3400 Ext. 18
Email:  [EMAIL PROTECTED]
--------------------------------------------









-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Aggarwal, Pawan
Sent: Friday, June 09, 2000 4:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Urgent:Displaying 10 records in one page


I got a suggestion that I should place the Hashtable containing the records
from the query in the session

Now there is a problem
There is a form which contains combo boxes selection upon which query is
based..
The results are based on the fields selected by the user..

Suppose a single user comes to this form..
Opens a NEW WINDOW simultaneously...now here no new session is created..I
have checked this..
In one window he provides different parameters and in the other different...

Now in the session hashtable variable name is same and also session id
So the values will be overwritten by the other...

The user wants different result in different windows however he will get
same...

How do people like altavista and google do it??

Please advice as this is a major issue..






        -----Original Message-----
        From:   Aggarwal, Pawan [SMTP:[EMAIL PROTECTED]]
        Sent:   09 June 2000 12:06
        To:     [EMAIL PROTECTED]
        Subject:        Urgent:Displaying 10 records in one page

        Hi,

        I am using a servlet to display 10 out of nth records got from the
        database..
        The servlet is using a helper class to get Hashtable..

        Now the same servlet will be called to display to another 10
records...

        How do I store the Hashtable so that the next time it reads the
servlet
        It displays next 10 records.

        I think storing hashtable in Session will not be adviceable..

        If someone has a piece of code will be of great help!!



        Thanks


===========================================================================
        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

===========================================================================
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