divsok 0 Newbie Poster

i created a jsp page and put a javascript code " window.onload=func(); " in the header when the page is loading.In that func(),i set two objects to the session (using AJAX) and get them back into the jsp.After debugging the aplication everything is ok.but jsp page doesn't display the content of the passed objects.i have to refresh the page for showing them.it is a headache for me.what can i do for that?