e aih Edigar , beleza ?
cara, eu te mandei algo!

procure mais em:
http://archives.java.sun.com/cgi-bin/wa?A1=ind9911&L=servlet-interest#350
procure por >>> Returning pages that span multiple pages
Existem 15 mensagens tratando do assunto.

curte soh. coloquei a primeira mensagem aih. eh exatamente o que quer:

>Yuki Tanabe wrote:
> I want to write a servlet whose number of html pages generated depend on the
> size of a ResultSet. Ideally the servlet will generate a html page with a
> pointer to the next page and/or previous page. What I don't understand is
where
> are the pages created on the fly by the servlet stored? Could someone
point me
> to a suitable reference manual or give me some explanation?


It would be unusual to actually store n numbers of html pages acording to the
length of the ResultSet. It seems to me there are various options though which
serve the purpose you imply.

1. Only retrieve a pre-defined section of data at a time from the db with
your SQL.
e.g. for the first page select * from database_table order by update_date
limit 10,
second page limit 10,10 ad infinitum

2. Retrieve a unique reference for each result the first time around, stick
them
all in a vector, array, or some other kind of storage, and stick that in the
session. Then call the database for a selection of those references for
each page
you serve.

3 (a more sophisticated version of 2). Put a wrapper around the ResultSet
(they're
not safe to put in the session presuming you're using connection pooling)
to put in
the session, and show a chunk at a time from that using cursors or something
similar to mark your current point.

4. You _could_ write out static html pages. This is only useful if the data
changes
(very) slowly.

5. Pre-prepare html pages and cache them in a Hashtable, ready to be
viewed. then
call them back by page number. If the pages are going to be repeatedly
looked at
and memory isn't lacking this is viable, otherwise stick with the more dynamic
methods.

6. Probably lots more much more efficient/effective ways I can't think
of/don't
know..



At 08:44 29/02/2000 EST, you wrote:
>Senhores
>
>Alguns dias atr�s propus um problemas pelo qual estou passando, mas pelo 
>visto ningu�m tem o conhecimento suficiente para resolver ( incluindo eu ). 
>Passo novamente a pergunta e pe�o encarecidamente que caso algum lister 
>conhe�a a resposta, que colabore, pois o objetivo da lista � esse. Desde j� 
>agrade�o.
>----------------------------------------------------------------------
>
>Desenvolvi uma aplica��o Web que faz consulta num banco de dados Oracle e
>devolve os primeiros 600 registros ( via servlet). Se passar disso a mem�ria 
>da m�quina
>estoura. Bem, quando fazemos uma pesquisa parecida em qualquer site de busca
>como o Altavista o Cad� ou o Yahoo e o resultado � muito grande, normalmente
>o resultado vem paginado, como por exemplo:
>
>Clique para os pr�ximos resultados:
>1 2 3 4 5 6 7 8 9 (pr�ximos)
>- - - - - - - - -
>
>Algu�m tem id�ia de um c�digo pra isso? Eu n�o tenho a menor e preciso disso
>o mais r�pido poss�vel...

_____________________________________________________________________________
Tamer Americo- Conselho Federal de Medicina - CFM - [EMAIL PROTECTED]
http://come.to/tamerico - [EMAIL PROTECTED] - ICQ#3221276 - Odigo#16141

"When we are young
Wandering the face of the earth
Wondering what our dreams might be worth
Learning that we're only immortal
For a limited time"
Dreamline - Rush
____________________________________________________________________________
_
* Para n�o receber mais e-mails desta lista envie um e-mail para 
[[EMAIL PROTECTED]]
e no corpo do email escreva [unsubscribe <seu-email>] ou acesse 
http://apoio.cits.br:8080/guest/RemoteListSummary/javabr
Veja as mensagens antigas em http://www.mail-archive.com/javabr%40cits.br/

Responder a