old pictures from cache? mabey?

Hi,

I am developing a webshop. When I add an item to the site it works. After that I add another item right away. I see the same pictures in the itemoverview page.

I use three jsp pages

- placeitem.jsp

- placeitemoverview.jsp

- placeitemsuccess.jsp

The first jsp has all the form fields including some input type="file" fields for uploading pictures.

When the user submits the form to the servlet, the servlet saves the pictures on the computer in a preview directory and forwards to the placeitemoverview.jsp page. Here the user can check if everything he filled in, looks good. After that the user pushes the button to place the item.

The item is saved in the database, the preview folder is emptied and the user is forwarded to the placeitemsuccess.jsp page.

So far so good.

When I add another item to the system with totally different pictures, sometimes I see the pictures from the former item in the placeitemoverview.jsp page. Thats weird because the pictures from the preview directory from the former item are not present in the preview directory. The correct pictures I just selected are.

Has this anything to do with caching on the browser side?

Any help would be nice

[1259 byte] By [jposthuma] at [2007-11-27 6:08:39]
# 1

You can disable client caching by adding the following lines to the HTML HEAD element:

<meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">

<meta http-equiv="expires" content="-1">

<meta http-equiv="pragma" content="no-cache">

BalusCa at 2007-7-12 17:11:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks that did the trick. Problem is solved now
jposthuma at 2007-7-12 17:11:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Sorry, It seems I was to soon with my conclusion. The problem still occurres.
jposthuma at 2007-7-12 17:11:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
I am using tomcat. I tried 5.5 and 6 Do I need to configure tomcat to fully reload the generated html files?Hope you can help me a little further
jposthuma at 2007-7-12 17:11:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...