File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Selection List Change not updated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Selection List Change not updated" Watch "Selection List Change not updated" New topic

Selection List Change not updated

curtis harrison

Joined: Sep 12, 2001
Posts: 8
I have a JSP page (page1) with a dynamic <select> list. When the user first gets to the page, nothing is selected. They select an item, click a button, and the correct item is sent to the next page (page2). However, from page 2, if the user presses the browser's back button, they go back to page 1, the same list is displayed with their previous selection highlighted. When they change the selection and click the 'next' button, they go to page 2, but the FIRST selection they had made is sent to page 2, not the most recent selection.
If they press the browser's back button and see the list with a selected item, and then press the browser's refresh button, the selection in the list is unselected. They can make a new selection, press the 'next' button, and the CORRECT item appears.
Is there a way for me to force a 'refresh' when a page 1 loads, or FORCE some kind of 'unselect' on the selection list when the page is revisited. I don't EVER want an item to be initally selected in the selection list.
Is there a command to 'unselect' all items in the list?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

It sounds like a browser caching problem.

There are a LOT of posts on here about this, do a search for all the META tag, and JSP solutions for this.
I agree. Here's the link:
subject: Selection List Change not updated
It's not a secret anymore!