I have an object class that has two arraylists, a description arraylist and a values arraylist. They are related in that the numbered index in one is related to the index in the other arraylist. I.E Description is for value.
These values are put into a servlet and passed to a jsp.
The first time through it works and the value's are assigned to the correct label.
Why do you set label value explicitly by calling a script?
The script you have encoded would not get called after refreshing by an ajax call.
I would suggest you write as below as it doesn't make any difference and serves your functionality
you are sending that value with the request object and when the page get refresh the request values are reseting so make it sure that the value should be in the session object so that unless you remove it from the session it will be available with the request
I understand that the question in this thread has been marked as resolved by me but looking back I still have a problem with this.
The first time it worked because I could simply put the JSTL segment in the labels inner html but what if I dont have that option?