a should not refresh problem

Hi all,

We have a web reporting portal in which the user logins into the website. Based upon the permission given to the user for viewing some reports,we stored the reports in an array list and usingsession.setAttribute() i have made the arraylist available in the session scope.An user is associated toReport A and Report B.i have displayed the two name in a drop down box. If the user clicks any of the reports the form corresponding to that report should come. i have used onchange() method and that works fine too. But the problem comes when the user fills the form for Report B and views the report ,the drop down box shows the value Report A instead of Report B. earlier i used theresponse.setHeader("Cache-control","no-cache") not to cache the form elements.but i removed it now. so my browser is not able to cache the previous submitted elements. i should display the value what the user has submitted earlier. Please help me in this regard.

[986 byte] By [Kannan_Sa] at [2007-10-3 9:42:47]
# 1
try changing the scope to "request" instead of "session."~Aman
aman_mahajana at 2007-7-15 4:59:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

yes mahajan i think i have not provided one information with my earlier post. The main thing is that this page where the drop down box is present is some thing like a submenu page which should be present until the user is logged out.

some thing like a header menu sub menu and a footer

some thing like

header.jsp

menu .jsp-

submenu .jsp--

body.jsp

footer.jsp--

The value of the body keeps changing. The report is displayed on the body.jsp

so if i have to use request instead of session then i should perform the same action in all the servlets which i write. so i suppose request will not solve the problem.

Kannan_Sa at 2007-7-15 4:59:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I don't see where the problem is... If the list is in the session, and the dropdown box displays the list, it's logical it always shows the first value of the list.You have to write addtional code to make it default-select the last selected Report
alban.maillerea at 2007-7-15 4:59:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...