I have 3 jsp jsp1 contains iframe jsp 2 contains a button and jsp3 contains some business logic , i open jsp 2 in jsp1 b y setting the src atrribute of iframe now when i click the button of jsp2 i want the iframe src to change from jsp2 to jsp3 how could this be done can anybody tell me
As it is seen from above code in JSP2 i set the iframe src attribute point to JSP3 but here the iframe is not visible to jsp 2 and jsp3 Can anybody suggest me how do i do this .
if the data to be stored was small then i would have stored them in session but here i have to store large data (JSP 2 contains a grid with 10000 to 60000 rows and form field values) i cannot store them in session and pass between jsp which consumes time
Wow. Do you display all the 10000 to 60000 rows at once? I as visitor wouldn´t like it. Introduce table paging (100 rows at once or so, which is much, much more user friendly) and a search tool so that the user don´t need to scan all the thousands records for the one he is looking for. If you write efficient paging code, then storing 100 rows in session or re-querying it from the DB won´t harm that much.
yeah i am doing paging in the grid and i provided slect From row to To row option (so that the user can select from row 100 to row 10000) also the user can select arbitrary rows not necessary consequent, now i have to pass this selected row from jsp 2 to jsp 3 .. now when i move back from jsp 3 to jsp 2 i dont want to loose the selected rows ...
posted 11 years ago
Then only store the row ID's of the selected rows.
As i said in JSP2 the user's selected form field values populate grid from database with around 10000 to 60000 rows and user again select few rows(selected rows shows different color) from the grid.... and these selected rows are passed to JSP3 now when i move back from JSP3 to JSP2 i want the same page to be displayed i.e all the rows populated based on form field selection and also the selected rows(with diff color so that the user should not select the already selected again) and to do this is it feasible to store all the 10000 to 60000 rows in session.. also if i re query the database it will take long time again as it took for the first time when the selection was made.
Can anybody suggest me on this.
Omar Al Kababji
posted 11 years ago
I think you will be facing a lot of problems in this mode, its not a good idea to send back 1000000 rows and then make the pagination on the client side, just suppose that the user will refresh the page then you will have to query the server again to obtain that 100000 rows. and i am pretty sure that the majority of the users will click on the "2" link to get the second page of your results so rarely maybe (1%) of the users will do this.
so the idea will be to make the pagination on the server side, and you send back to the user only the results of the first page and the total count so that you can make the pagination, however when the user wants to check the next page then another query will be done on the server. by this you will remove a huge overhead on the server. and at this point you will be able to put only the parameters of your form in the http session and the selected rows so that when the user comes back from page jsp3 to page jsp2 you will be able to regenerate the old query to obtain the same results and show the selected rows ;)
i really really advice you not to use the pagination in this mode its very inefficient and will cause you a lot of problems, if not now later when your application gets used by many users.
if the rows you get out from the DB are always the same and its rarely that they change you can make a caching mechanism to cache these data
Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop