> i have servlet read from DB and set result at
> vector
Vectors are normally discouraged because they're Synchronized.
Why don't you read the ResultSet in an ArrayList Collection instead?
> and put it in session attribute to jsp that
> read it and print it
Instead of putting the ArrayList of results (or in your case Vector) into the Session, you could store it in the HttpRequest attribute instead.
HttpRequest attribute has an advantage over HttpSessions
1) The Request Attribute is available through the scope of the Request
But the session attribute can expire at any time. The session attribute will not work if the page gets cached by the browser.
> but this view does takes 10 sec on my computer
> and on hosting server
If it is taking that long you may want to optimize your JDBC code.
1) Use Connection Pooling
2) Prepared Statements
3) RowSet
4) Check the SELECT statement
> it shows date un complete what is do you thing it
> wrong
Hard to say without looking at the code.
hi
this more details
1 this account application for small company
2 i read from account table in DB all accounts in vector
3 for each account i send it to method to get it balance at (forexample 1-1-2006) then another method to get it balance at (31-12-2006)
and set this data at vector and continue that for each- loop- (all between servlet and javabeans).
4- set this vector into session attribute then redirct to jsp
5- jsp read this attribute and print it.
but in my pc it show correctly in 10
but in hosting it uncomplete