The moose likes JSP and the fly likes About file uploading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "About file uploading" Watch "About file uploading" New topic

About file uploading

kira yamato

Joined: Mar 24, 2005
Posts: 7
i was doing image file uploading..so when i add a image..i just add it with imput type = "file" then display on a jsp page with somethin like img src="<%=request.getContextPath()%>/Images/"<%=fileName%>"/> where fileName is the fileName saved into database

But when i tried to edit the image..as in ..i deleted the image and put another image again for the same record and update the name. The renewed image will not show immediately but have to wait for a while then click back button and image will be shown. But when i do adding of a record plus uploading image to server disk.i dun have this problem... why is this so ?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"haha hehe" -

Welcome to the JavaRanch! Even though your displayed name illustrates your enourmous good humor, please adjust it to meet the JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Your problem most likely has nothing to do with file uploading... it's probably due to the browser doing image caching.

Take a look at this thread that described a similiar issue.
It is sorta covered in the JavaRanch Style Guide.
subject: About file uploading
Similar Threads
Problem in importing html file in jsp
refreshing the BLOB
JSF with fileupload and iframe
Problem in file uploading
getParameter, getInputstream, getReader and uploading an image?