File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Problem Refreshing a JSP within itself......... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem Refreshing a JSP within itself........." Watch "Problem Refreshing a JSP within itself........." New topic
Author

Problem Refreshing a JSP within itself.........

Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
I am writing a JSP which removes items from a top LIST box to
dynamically generate a Table below on the same page.
And removing rows from the table to add back to the Top List.
This is working well, EXCEPT that on removing one or more rows
the items contained in the removed rows are not added to the top
List immediately.Since the code generating the List
(dynamically from a Query) as been by-passed before removing the
rows. So, the items removed are added on display after the next
request(submission of the form).
Please, how can i RELOAD the page within itself to go back to
the Logic (scriptlet block)on top which generate the list
before any next request.
Note: the Top list is generated using a HashTable (in java.util package) and the Table with each row (containing an item removed from the Top List(i.e. select) and a checkbox + textfield) is also generated by a second Hashtable.
[This message has been edited by Gabriel Fox (edited November 27, 2001).]
Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
I am writing a JSP which removes items from a top LIST box to
dynamically generate a Table below on the same page.
And removing rows from the table to add back to the Top List.
This is working well, EXCEPT that on removing one or more rows
the items contained in the removed rows are not added to the top
List immediately.Since the code generating the List
(dynamically from a Query) as been by-passed before removing the
rows. So, the items removed are added on display after the next
request(submission of the form).
Please, how can i RELOAD the page within itself to go back to
the Logic (scriptlet block)on top which generate the list
before any next request.
Note: the Top list is generated using a HashTable (in java.util package) and the Table with each row (containing an item removed from the Top List(i.e. select) and a checkbox + textfield) is also generated by a second Hashtable.
Manas Ahlaad
Ranch Hand

Joined: Nov 07, 2001
Posts: 165
hi
you can use java script to do that , i dont think u need to make it a request to the server.
what do you say !
manas


Manas<br />Today If You are not Confused,You are just not thinking Clearly !<br />---------------------------------
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 565
I don't think you should try reloading the page, it would be more logical to re-arrange your business logic so that the JSP can work out at the top of the page which part of the page each item is in, and then go on to display the two parts.
That seems very obvious to me, so perhaps I misunderstood your question. Did I?

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
You guys are ever wonderful.
Cheers Adam.I did just want you suggested and it worked.
I re-arranged my Logic thus:
1.Processing of java.util.TreeMap implementation handling Top List and that for bottom dynamic table came first
2.Followed by Logic to display List
3.Lastly Logic to display Dynamic table
And that's it.Thanks once again.
 
 
subject: Problem Refreshing a JSP within itself.........
 
Similar Threads
Jamming javascript variable into the session
Problem displaying a dynamic table on a JSP....
Problem removing items from a List(i.e.select) to an html table on the same page..
Problem Disabling a Link...........
How do i RELOAD a page within itself....