Image deletion won't display in browser

Hey everyone, simplly put I am displaying a picture I have created to the user, after it is displayed I wish to delete it from my drive, the only problem is that the image is deleted before it is displayed, i want it the other way round.
I have created a servlet program which creates the image and sends it to a jsp page where it is displayed. After the code that displays the image executes I create a class where I delete the file. In a perfect world the image would still be displayed in the browser as the file is deleted behind the scenes but in this case the code to delete it deletes it before it is displayed, I have tried a few things including putting the thread to sleep for a few seconds and then deleteing the file, all to no avail. Any ideas?
thanks

Putting the servlet to sleep won't help.
The request for the image is made seperately to the servlet call.
The browser can only request the image once it has received the html page.
Obviously it needs time to receive the html page, send a request back for the image, and then have time to download it before you delete it.
I think the best method would be to schedule a process that deletes image files from a directory (for example) every five minutes (based on their timestamp of file.lastModified() so you don't delete any current ones)
Good luck,
evnafets

Similar Messages

  • Does anyone know why all of a sudden any new parent divs I add won't display in browser preview?

    Does anyone know why all of a sudden any new parent divs I add won't display in browser preview?

    yes styles are applied. What does not show up are the container divs - they all have the thin purple borders.
    The "Blog Lovers" image shows up but it is inside the #blogindex div - which seems to be invisible because the elements inside #blogindex div are just piled on top of each other. (see below html) This is now happening on all the pages of this site.
    (I test a different site in DW and I was able to add divs and borders and content inside divs just fine.)
    <!-- start #blogindex --> 
         <div id="blogindex">
            <div id="blog_image1"><img src="images/bloglovers.gif" alt="Blog Lovers" /></div>   
             <div id="blog_image2"><img src="images/gcblogheader350x70.jpg" alt="Gina Charles Blog" /></div>
          <div id="blogindex_text">
          <p class="blackbolditalic">Visit the blog for happenings, highlights and conversation! </p></div>
          </div>     
       <!-- end #blogindex -->
    http://www.newworldapparel.com/tests/  -scroll 1/2 way down page to see the "Blog Lovers" pile up!

  • Saved for web images won't display in browser

    I am using Photoshop elements 5.0 on WinXP. when I save images for web , they will not display in browser (IE) but images downloaded from net and other sources will display ok, but once opened and saved with my PSE they will no longer display on browser. I have tripple checked .jpg ect. all seems ok.Any idea's welcome .

    I ran across this a while back and it took me a minute (or two) to figure out what was wrong. For JPG images to display in a web brower, the color mode must be RGB not CMYK.
    Hope this helps,
    Gilley

  • Image won't display in browser

    An image I am attempting to display won't come up in browser.
    The error when I check for browser compatibility is unsupported
    property layer background image. I am quite new at this.

    Let's see your code, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Crusey" <[email protected]> wrote in
    message
    news:fqe189$ht8$[email protected]..
    > An image I am attempting to display won't come up in
    browser. The error
    > when I check for browser compatibility is unsupported
    property layer
    > background image. I am quite new at this.

  • Image files won't display (jpg)

    Hi,
    I'm evaluating Robohelp X5, I've created a new topic and
    imported a PDF of a visio org chart. I've then created an image map
    over a part of the flow chart and linked that to a picture. When I
    click the view button the link works ok but when the project is
    compiled and I try it I get an empty box with a red X in it.
    I've done something similar (flowchart) and this seems to
    work ok so I'm not sure where i'm going wrong.
    Any help would be greatly appriciated.
    Thanks

    Hi,
    The problem is caused by your project not 'knowing' about the
    picture. Robohelp will automatically include all images that are
    embedded in HTML docs, but if they are only displayed via a link,
    they do not form part of the files list that is created in the
    resulting .HHP file.
    A remedy: to resolve this in the past, I've created a 'dummy
    page' that is not indexed or included in the TOC, and contains
    embeds of all of these pictures that aren't directly set in the
    HTML. Make sure it is included with the correct conditional build
    tags and recompile, you should find that the linked image now shows
    up in the CHM okay.

  • PDf won't display using browser

    How do I get my browser IE 10 to open a PDF file?  I cannot download a PDF file either.

    I would just get a white blank screen. Here is what I did:
    First change the defaults in Adobe by doing the following:
    Click "Start">All Programs>Adobe Reader>Edit>Preferences>Internet>Web Browser Options>Tick "Display PDF">OK and exit Adobe.
    THEN you want to change the security options:
    Open Internet Explorer(IE), Click "Tools">Adnvaced>Scroll  Down to Security and Uncheck"Do Not Save Encrypted Pages to Disk">Click apply or ok and exit.
    This should work. You may have to restart your computer for it to take effect.
    I had this problem after trying to install KIS(Kaspersky Internet Security) and in so doing was advised to reset my security to defaults which was a mistake as the issue was not with my computer but rather with Kaspersky's server as I was able to install it the next day. Resetting security to defaults could create a problem as you are setting settings that worked before and now do not. Anyway try my solution above and let me know if it works, which it should.

  • SWF in Dreamweaver doc just shows a white box.  Won't display in browser.

    Just installed CS6 Web and Design Premium on 27" iMac with OS X 10.7.4.  SWF files from Flash 5/Dreamweaver 5 display fine in all web browsers, but Flash CS6 (ActionScript 3.) SWF files result in the message - "Adobe Flash Player has stopped a potentially unsafe operation..."  I set the root folder of the web site I am working on as a Trusted Location Settings in my System Preferences and restarted, but no luck.
    What am I missing?
    Many thanks to anyone who knows what the issue is.

    Please post this in the Dreamweaver forum:
    Dreamweaver

  • Safari won't display a site correctly, sometimes page takes extended time to respond and partially loads other times images wont load

    So I have a friend who I've been trying to assist with this. I don't know if she has issues with other sites or she may not have encountered any yet, but one in particular is just not working. It started about a month ago around the time she moved (so different ISP/router etc.) though not entirely sure if it started right after that or if it was just coincidence. Anyways she cleared cookies/cache, no luck. I had her update and restart the computer, still not working. Disabled all extensions, still doesn't work. It can take upwards of 30-45 seconds to even respond in some cases, and when it does sometimes the page is all white with just text improperly formatted, but the background doesn't display at all, other times the background images and text are displaying correctly but the nearly all the user submitted images on the site (deviantart) will not display. I believe she mentioned it occasionally happened on tumblr as well.
    Other computers on her network are fine. I downloaded Firefox to see if it was a problem that persisted across browsers and indeed it did. So I went into the console on Firefox and looked at further information and it was returning Status Code 304 Not Modified which I looked up and that says it is telling the browser that the images should be loaded from cache. Problem with that is she shouldn't have any cache as its been cleared. I searched around this issue, found a suggestion saying to clear DNS cache, tried that and suddenly Firefox worked. I then logged into her username on DeviantArt through Firefox and suddenly the issues returned. I eventually was able to log out and things worked again. Now when I log into her account through Firefox it works fine. Safari still has issues.
    I've even deleted the cache.db file in the library/safari folder and quit/restarted Safari and still no success. I've tried disabling cache through the developer options. The status code 304 error made me believe that the reason the images weren't showing up is because there is no cache for those images but the server is telling the browser to use the cache so the images cannot load. One last thing I can mention is that on the console in Safari, it often just returns many errors for all the images on the site saying it didn't respond. One time there were errors saying something about the security certificate but I refreshed numerous times after that and that error never showed up again in the console. Anyone know what might be causing this?

    Hi ...
    Start here >  Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found
    If nothing helped from that link, try troubleshooting Safari plug-ins.
    From the Safari menu bar click Safai > Preferences then the Security tab. Deselect:  Allow all other plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.

  • Image with foreign characters in name won't display

    I have an image on my drive whose name has foreign characters ("c�pia de frente.jpg"). To display the image my JSP reads the image name from the database and generates the following html:
    <img src="../pictures/c�pia de frente.jpg">The page then displays a broken image icon for this image. Images in the same list which do not have foreign chars get displayed accurately. When I choose "show image.." in my browser I see that the image name has been rewritten into the following: c%C3%B3pia%20de%20frente.jpg. The rewriting that will display the image is instead c%F3pia%20de%20frente.jpg. I found the correct rewriting on another of my JSP where the image with the foreign chars actually gets displayed correctly although the code to generate the html is the same on both pages and looks something like this (simplified):
    <logic:iterate id="listelement" name="list" property="rows" scope="request" type="org.apache.commons.beanutils.DynaBean">
    <%         
    out.write("<img src=\"../pictures/"+listelement.get("name").toString()+"\">");
                             %>  <br>                     
                            </logic:iterate> Every image that doesn't have foreign chars in its name gets displayed accurately but images with foreign chars in their names won't display. What am I doing wrong?
    Thanks
    Niklas

    Thanks, but it doesn't seem necessary to replace foreign characters. It works without replacing in one place but not in another which is confusing. I think it is something with the enconding but can't see what the difference is between the working and non-working code. In both pages I have put <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">I'd greatly appreciate any more suggestions to solve this problem.

  • DW8:  image won't display in Design View

    Folks:
    DW8 on MacOS 10.4.8 (fully updated) on Intel iMac.
    What would keep an image from displaying in DW Design View?
    What are the causes of the grey box with the superimposed "X"? Is
    there any diagnostic output that might help? Is the grey box and
    "X" substituted by DW8 for an invalid or un-drawable graphic, or is
    this done by the OS?
    The problem:
    I've got a 1912 x 1481 graphic, a geographic map, in AI that
    I'm trying to use as an ordinary web image, but DW won't display it
    in Design View. Instead all I see is a big grey box and "X". For
    test purposes, I'm starting from a new "Basic" HTML web page and
    all I'm doing is inserting this one image. I need to get this
    working so I can draw hotspots on this graphic to make it
    "clickable" .
    Here's what I've tried:
    o Triple-checking that the inserted image reference is
    correct. Yes, the image file is correctly linked. With the image
    selected, the inspector shows a tiny but recognizable miniature of
    the expected image. Further, when the page and the image are
    uploaded to the web server and I look at it via a browser, the
    expected image is _always correctly displayed.
    o Exporting the graphic "for the web" from AI as both a GIF
    and a medium-quality JPG. Neither of these are displayed in Design
    View; both are served up correctly after being uploaded
    o I found a larger JPG on a different site I'm managing. This
    always displays as expected in both DW Design View and when served
    up. I substituted the failing map JPG image. The result: A grey
    box.
    o Checking the map images: The JPG and GIF versions seem to
    be visible in all environments (image readers, browsers, etc.) I've
    checked _except_ DW8 Design View.
    o Checked on another system. I made the failing image
    available to a very helpful ACE, who performed a similar
    experiment. It worked fine for him. I used his exact HTML and
    directory structure -- and it failed for me. Grey box with "X".
    It seems to me that I've checked most of the obvious
    possibilities. Now it is time to check the less obvious ones.
    Suggestions are very welcome!
    Thanks,
    Henry

    Randy:
    Thanks for your response.
    This is a virtual memory system, so -- in theory-- it should
    accommodate anything that will fit on the hard drive, more or less,
    if I'm wiling to wait the hours (days?) it will take to swap on and
    off the disk. That assumes DW8 takes advantage of the capability.
    It may not.
    "Larger"? The JPG image I compared to is 1692 x 2160 pixels,
    but weighs slightly less, 289K bytes. I'm losing track of all my
    test images that fail, but a representative one is 1912 x 1481
    pixels and weighs 332Kb on the disk. "Roughly comparable" might be
    a better description. The point is still reasonable: DW8 does
    handle images of this size on my system.
    One issue that occurred to me recently is that I may have
    caused some grief by monkeying with the "Save for web" settings at
    the Illy export. Perhaps I asked for some configuration that's
    normal for Illy to export --or it would have warned me, I hope--
    but too strange for DW to grok. DW should complain more
    informatively than painting a gray box and "X" when that happens, I
    would think.
    Henry

  • Safari won't display pdf in browser

    Posted before in wrong forum.
    I am really sorry if this has been posted before, but I have been searching the forums and can't find an answer to it. I was also looking for the FAQ article about this that Apple says is an answer, but can't find that either.
    Anyway, using 10.4.11 and Safari 3.0.4. Safari won't display pdfs in the browser. It is gray with the Acrobat logo.
    I remember reading that the solution is to uninstall (delete) Safari and reinstall 3.0.4. However, I cannot find an install for 3.0.4 for Mac, and then do something with Acrobat. I am using 3.0.4 because it was part of a bundled OS update. I can't go back and downgrade my OS...
    What do I do?

    Hi,
    You probably won't have to reinstall Safari. Two things you can try. If you open Adobe Reader and go into the 'Internet' section of its preferences, you should be able to disable the browser plug-in. Some times that alone isn't enough, in which case, browse to HD/Library/Internet Plug-ins/ and move the Adobe plugin out of the folder. Restart Safari for the changes to take effect.
    Yang

  • JPG won't display in Image box.

    Trying to add a logo in JPG format to the top of the form using the Image control, but it won't display the image nor print it. If I use a GIF file it works fine, but looks horrible. I'm new at this, any ideas?

    I finally figured it out after posting another frustrating comment to this thread. I can't take the credit, however, as it was quickly solved by Irv Kanode in another thread. I have copied his exact post below. It solved this issue in seconds:
    ADOBE SUPPORT REPLY:
    Irv Kanode - 4:15pm May 5, 06 PST (#1 of 2)
    Check some of your JPEGs for CMYK vs RGB.
    Might the ones that fail be CMYK and the ones that work be RGB?
    When images don't work are you seeing a broken image icon or...?
    Irv
    Adobe Support
    USER FOLLOWUP TO ADOBE SUPPORT SUGGESTION:
    Kurt Wedberg - 5:27pm May 5, 06 PST (#2 of 2)
    Irv,
    Thanks for the reply. The images that didn't work were CMYK. When I converted to RGB they worked.
    The images that didn't work were coming up with random grey scale colors.
    Thanks again,
    Kurt
    Hope this helps everyone!

  • Messages won't display images, sandbox violation?

    Can anyone help me figure out why, when I receive an iMessage that contains a photo or other image, Messages on Yosemite won't display the image? It appears to be a sandbox permissions issue, but I can't figure out how to resolve it.
    Briefly, when I receive an iMessage that contains any image, the image displays just fine on my iOS devices, but in OS X Yosemite (10.10.1, build 14B25), it just shows up as a generic icon (attached at the bottom of this question). Clicking the icon or magnifying glass doesn't load it, double-clicking it doesn't load it, Quick View won't show it... nothing. If I look in /var/logs/system.log, any attempt to view it generates sandbox-related errors:
    Messages[30820]: [Warning] Transfer: unable to create image for IMG_2758.JPG.jpeg
    kernel[0]: Sandbox: Messages(30820) deny file-read-data /private/var/folders/7l/cn4n4k4n4p31ncqq9qqk1klrydkmkm/T/IMG_2758.JPG.jpeg
    If I manually open up that directory (/private/var/folders/7l/cn4n4k4n4p31ncqq9qqk1klrydkmkm/T/) I can see the image and open it myself, but Messages can't do it... and I can't for the life of me figure out how Messages's sandbox is configured and what is going on here.
    This all happened when I upgraded to Yosemite; prior to Yosemite, everything worked fine. I've tried to blow away /private/var/folders/7l/ and let it get rebuilt, to no avail. I've also hunted for Messages's sandbox config file, to no avail.
    Help?
    Thanks in advance!
    Jason

    Hi,
    That does seem odd.
    I mentioned the Containers things as this is the Read and Write route that the app uses (normally to the aliases in the /Data/Library/Preferences that pints to ~/library/Preferences)
    I also looked in those places but for IDS, SOAgent and IMAgent that are also involved but no luck.
    On your Console Location for the Var Stuff I have this
    See Path Bar across bottom. This pic of Dec 1st I had to open in Preview.
    A Different view if it helps
    I am not sure what to suggest at this point.
    8:28 pm      Tuesday; December 9, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Never saw Safari doing this before! Won't display some images !!! *** ??

    So I am using Safari for quite some time. All of a sudden, in the middle of the day, Safari won't display all the images on any given web page. For example, I go to flickr.com and see that half the photos on the page wont load. The status indicator says that Safari is done trying to load the page, yet half it is empty. Resetting, and then restarting Safari does nothing to help the situation.
    I really want to like Safari but am bewildered by all the problems it has (massive memory leaks, CPU runs at 100% every other day).
    But not showing photos is too much!
    See this > http://farm4.static.flickr.com/3026/24292326189cfa374007o.jpg
    Message was edited by: iAyan

    I, myself am not crazy about Firefox, because it's a resource hog. Safari on the other side is simple, neat and clean. I have uninstalled the Apple Updater that gets installed with the Safari installation and that ensures that Safari doesn't give me any hassles.
    It is just this image problem that I am experiencing at the moment. I really hope that someone can resolve this before the final release of Firefox 3.

  • Emails won't display remote images

    After a recent update (24.6.0) remote images in all emails stopped displaying...
    I've checked
    permissions.default.image (1)
    mailnews.message_display.disable_remote_image (true)
    but images still won't display

    Something else to try is to make sure you are not using a proxy.
    Tools>>Options>>Advanced>>Network & Disk Space>>Settings and check no proxy.

Maybe you are looking for

  • IPod is not recognized by Updater or by Windows

    So far I've: 1. Followed the Five R's. 2. Restarted my computer 3. Tried to use the updater - but it does not recognize my iPod. 4. Tried to use Computer Management (Windows) to reformat my iPod, but it doesn't locate the iPod. 5. Tried an alternate

  • Is there a script for changing layer names in ID CS4?

    I have multiple documents with an average of 20 layers in each. Each of the layers is named for the expiration date of the coupon in the ads. When a new order comes in I retrieve the previous files and change the dates via scripts and the Find/Change

  • Inspection lot assosiated with 322 mvt.

    Hi QM experts, Inspection type 08 is asigned to the material. bue when we did a 322 mvt the system didn't create the Inspection lot but the stock posted to Qulaity inspection. All the movements happened on 3 years back. Not possible to cancel the mat

  • Bad overall macbook pro build?

    Hi, I had my macbook pro for about six months now, and most of the time it's been giving me problems to the point where its becoming a hassle. In the upcoming week, the visit to the genius bar for technical support will probably be my 5th time. So fa

  • HT3275 never ends to complete the first backup

    After the initial setup time capsule never finished making the first backup. 40 Mb be wanting to complete the copy and hence does not pass.