• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

uploaded image file doesnt reflect in the page

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am facing some typical problem with image uploading, I ma using commons file upload API for uploading image file.

When image is uploaded to /[mywebapp]/images/ folder it successfully uploads there, I have cross verified it by exploring to that directory manually.
The problem here is I dont see the updated uploaded image file in my web page even I refresh my browser.

But when I refresh the web application project folder in my eclipse IDE then if refresh browser window it reflects update image.


why it is happening like this? any solution for this?

am I doing any thing wrong while displaying the image file in the browser?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it only works after refreshing your IDE then it's because your IDE isn't deploying the new image.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Thanks for your response.

earlier I tried with firefox and now I tried with IE and come to know that after deleting offline content I could able to see the uploaded image file.


don't know what is happening internally.

Thanks,
Sai

 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please somebody help me!!!
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How? You haven't given any additional information, described your deployment environment, explained what you meant by "deleting offline content", told us if you're properly setting "no cache" headers when you stream the image back (or are you directly accessing the image? Which would lead to issues when your app is redeployed since the image directory might be deleted.)
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

I directory is not being deleted internally because I can check the latest file uploaded in that directory, confirmed it manually by using windows explorer.

My deployment is using tomcat inbuilt plugin in Eclipse IDE and I just start the server in my IDE and it runs internally. everyhitng is fine and comign to uploads is also ok but when I access that image url from my browser it shows older image file not the uploaded image file.

Every time I upload the image file it will replace the existing file in the same location with the same name so it doesn't show the latest uploaded file but it shows older image file with the same url.

However I can confirm that new file is uploaded properly in that location by exploring to that location manually.

When I refresh web content folder in my IDE then it reflects in the browser as well..


I am not aware of cache..


any more questions?? please let me know.

Thanks,
Sai
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I kind of already told you what the issue is; Eclipse will not redeploy the file until you do an F5, "Refresh Workspace".
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As this is an eclipse issue versus a real JSP issue, it's been moved to the IDEs forum.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:I kind of already told you what the issue is; Eclipse will not redeploy the file until you do an F5, "Refresh Workspace".




Thanks David.

But how to work in the development environment while working on images?

any better approach?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't serve images from within the web application working directory? Other than that, I can't think of anything. Is hitting F5 that difficult?
 
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic