So what can I do to prevent webstart from caching my files?

Hi
I have installed java jre-7u7-windows-i586.exe on windows 7.
and this pseudo code running within webstart:
HttpURLConnection conn = (HttpURLConnection) resource.openConnection();
File cached.......
conn.setIfModifiedSince(cached.lastModified());
conn.connect();
int code = ((HttpURLConnection) conn).getResponseCode();
Now my problem is that I always get 200 for the int code back.
But it should be 304 (not modified)
This happens because webstart is serving the file from ist cache as I can see in the following trace log entry
network: Cache entry found [URL: https://server.com/wanted.jar, Version: null] prevalidated=false/0
but this is not good for me....
In the jsp serving the file I have a
((HttpServletResponse) response).setHeader("Cache-Control", "no-cache");
So what can I do to prevent webstart from caching my files?
Edited by: 962394 on 11.10.2012 10:11
Edited by: 962394 on 11.10.2012 10:12

i just found the solution
Java 7 JWS URLConnection caching
I need todo
conn.setUseCaches(false);

Similar Messages

  • Recently when I download photos from my Canon G11 I get one or two "unsupported image format"  This seems to happen when I have taken a photo of the same subject but have zoomed in on it.  Why does this happen and what can I do to prevent this?

    What can I do to prevent this from happening?  I would like to have all my images downloaded from camera to computer and then make my choice as to which one to keep and which to deleted.

    1. You did not get an error message telling you that your iPhoto library was getting full. You got a message telling you that your HD was getting full, right?
    OS X needs about 10 gigs of hard drive space for normal OS operations - things like virtual memory, temporary files and so on.
    Without this space your Mac will slow down as the OS hunts for space on the disk, files will be fragmented, also slowing things down, apps will crash and the risk of data corruption - that is damage to your files, photos, music - increases exponentially.
    Your first priority is to make more space on that HD. Nothing else can be done until you do.
    Purchase an external HD and move your Photos and Music to it. Both iPhoto and iTunes can run perfectly well with the Library on an external disk.
    Your Library has been damaged from being run on an overfull disk.
    How much free space on it now?

  • What can I do to prevent the control key from not working in the future?

    Background:
    I bough an macbook pro about 1 year and 3 months ago and after 9 months of usage my control key stopped working for about an hour or two.This happened every time I turned on or awoke my mac from sleep (lid down).I sent it to an authorized apple service center and they replaced the keyboard.Everything was fine for about 4-5 months when the same thing happened again, ctrl key stopped working but this time not when turning on my mac but at random times and for random intervals.I sent it again to the service center but they told me that this time it won't be for free because my 1 year warranty has expired.I should mention that in European Union and Romania (the country where I am from and from which the mac was purchased) the law is that any electronics device sold has to come with at least 2 years of warranty.Apple seems to ingore this law.
    Anyway, after long conversations with apple uk on the phone they agreed to pay for the keyboard but not for the labor which was 70 eur ($100).It's not much but my 2 year warranty should have covered it.The sad part is that I have no guarantee that it's indeed a keyboard error and not something else, this might happen again in 4 months and I doubt this time apple would agree paying for the keyboard (which is 150eur) ($215).
    I should also mention that before calling apple uk I tried apple's romanian number (listed on their site) and it didn't work on the 3 phone networks that I've tried (2 fixed and one mobile) which led me to believe that apple support is in fact a big joke.
    Suffice to say that I will no longer purchase any apple devices or software, I regret purchasing mac os x lion just a week ago, when I will no longer use it because I intend to sell all my apple gear (timecapsule, iphone4, macbook pro) and buy stuff from companies that value their customers and respect their contracts.
    My questions are this:
    1) why does apple ignore EU and Romanian law?
    2) what can I do to prevent this from happening in the future
    3) can I request that my macbook be more thoroughly inspected? I suspect the keyboard is not the main problem and it will soon happen again as it happened two times already.
    4) can I do something for the repair labor charge to be waved? It is illegal in my country to ask for one in this scenario...

    Everyone reading your posts here is just another MacBook Pro user. We're all volunteers, not Apple employees. No one here can speak for Apple.
    In my personal opinion, buying Apple products in a country where Apple has no stores and no corporate presence is a risk that the buyer takes knowingly. I don't think it's a wise risk, and I don't recommend that anyone take it. A small percentage of the products sold anywhere are going to have problems, and it makes more sense to buy an inferior product that can at least be serviced locally than to buy a superior product that may have to be sent thousands of miles for repair if anything ever goes wrong with it.

  • Why is my screen zooming in all the time? and what can I do to prevent it?

    Why is my screen zooming in all the time? and what can I do to prevent it?

    Press the key combination option-command-8 to disable Zoom. If you're using an Apple wireless mouse, open theMouse pane in System Preferences and uncheck the box marked Smart zoom.

  • I got a new laptop and i want to insert my ipod to it but i'm afraid i'll lose my apps what can i do to prevent that???

    I got a new laptop and i want to insert my ipod to it but i'm afraid i'll lose my apps what can i do to prevent that???

    The shuffle is not a backup device.
    Was the media actually moved from the old computer to the new computer? If not, how did you magically make the content appear on the new system?
    Use the backup of the old computer to put all the content on the new computer.

  • When I open my MacBook Pro for the first time each day, I find condensation on the glass.  What can I do to prevent the condensation?

    When I open my MacBook Pro for the first time each day, I find condensation on the glass.  What can I do to prevent the condensation?

    This thread and all the followups are hilarious, if it weren't such a serious problem. OP, you may want to add a bit more information on how this drippy screen problem occurs: where do you live, what are the weather conditions, what are you doing with the Mac when it occurs, etc.
    Yes, extreme moisture, to the extent of causing visible condensation, is Very Bad News for any electronic device, and more so with one that isn't tropicalized like the Mac. Besides trying to avoid subjecting it to such extreme temperature changes, using some kind of desiccant to absorb close range moisture and avoidint its use until it dried out, I can suggest placing some kind of absorbent material between the display and the keyboard to prevent the moisture on the glass from finding its way into the computer. Like the protective poliethylene foam protector that came with the Mac when new. Or something like RadTech's ScreenSavrz: http://www.radtech.us/Products/NotebookScreenSavrz.aspx

  • Every time one of my email addresses doesn't work on my mail app, due to wrong password or whatever, it deletes all of the contacts form my phone.  What can I do to stop this from happening?

    Every time one of my email addresses doesn't work on my mail app, due to wrong password or whatever, it deletes all of the contacts form my phone.  What can I do to stop this from happening?
    I have tried deleting the account and it deletes all my contacts.  I have verizon and even using back up assistant, it says the contacts are there but they aren't.  The only way i can find a contact is if I start to type a name in and new text but once i sent the new text, the name disappears and it just shows the number.  Siri nor the address book don't recognize any contacts at all.

    I cant find any reciept in my email or in my husbands email.  I am going to attempt to call and speak to someone who can help me because this was not my fault except trying to be normal and update my phone!

  • What can i do if one song from iTunes Store is not working?

    What can i do if one song from iTunes Store doesn´t work?
    The song starts normally but it ends after 7 seconds.
    It is the new song from Kid Ink (Show me feat. Chris Brown).
    I bought the whole album and one song doesn´t work. I am a little bit upset.
    Thank you for your help
    Patrick

    Delete and redownload it if doing so is free in your country.
    (99523)

  • Every time I turn on my laptop about half a dozen previous documents open up and I have to close them before I can begin. Can anyone help me prevent this from happening as it's driving me nuts!

    Every time I turn on my laptop about half a dozen previous documents open up and I have to close them before I can begin. Can anyone help me prevent this from happening as it's driving me nuts!

    First thing to (un)check:
    When you shutdown/restart, there's a dialog box which confirms your request. In that box is a little checkbox which you should uncheck.
    charlie

  • Preventing XI from consuming a file before it is time

    Hi all,
    I wish I could prevent XI from consuming a file in the outbound directory before it is time.
    There are two business aspects :
    <b>1</b>- a new file with the same name could be sent in the outbound directory and the old file should be erased by the new one
    <b>2</b>- the message(s) extracted from the file should be sent to the receiver only during a certain period when the receiving application is ready for it.
    As this problem is common to many scenarii, I am looking for some reusable solution.
    I thought of (or was proposed) the following solutions :
    - <b>event-driven messages</b> : the condition 2 is OK, but the file is consumed, so if a new file arrives, it is also consumed  and both sets of data are sent to the receiver. Therefore, condition 1 is not correct.
    - <b>BPM</b> : I am not yet familiar with this part of XI,  and I wonder whether it could work.
    - <b>module adapter</b> : as a Java developer, it was nearly piece of cake to say whether it was time or not to send the message(s) . But the module is executed after the file was processed, so condition 1 isn't fulfilled because the incoming file has been moved to archive directory before the authorized period. I tried to change the Processing mode from "archive" to "test" in order to avoid the file being moved and it works fine, except I'm not keen doing that in a production environment.
    Moreover, when it is not time, how to  cleanly" stop the process? I figured out I could sweep all data from xmlpayload so the process would carry one, but with no data. I don't know why, but it produces some mapping error and a red flag in monitoring. I also thought about throwing Exceptions, but I have no monitoring.
    It's quite a long blog, but I wanted to explain what the problem was and what ways I tried.
    Has anybody some advice to give me (except suicide, my boss wants his problem solved first ) ?
    Regards
    Yann

    Hi,
    >>>Isn't there any solution only using XI and Java (for functions, modules...)?
    yes but a littble bit more difficult:
    instead of the ABAP report you can send ANY
    scheduled message to the XI (using any adapter)
    and this will invoke the java proxy
    that will move the file to the correct folder
    so it can picked by the file adapter
    at that correct time
    BTW
    it's that with ABAP you have nice SAP scheduler
    that you can use
    Regards,
    michal

  • Prevent SWF from caching?

    Hi.
    I have a problem here, I've been searching on google and through forums for hours now trying to find a way to prevent my site from cache in browsers. I know it's not possible to "prevent" it from caching, but it's a way to trick the browser into thinking it needs to load the SWF again instead of just getting the one from the cache.
    Now I've tried many types but I can't get it to work. I don't understand how to implement it into AS or Javascript and what goes where..
    My site is set up by one parent SWF combined with a HTML script and 6 child SWF's, and they are updating all the time so I really need this function.
    See it here: http://www.vgn.no
    The most used one is this I think or something close:
    myIdentifier=Math.round(Math.random()*10000);
    loadMovie("myAnim.swf?uniq="+myIdentifier,1);
    If someone knows a better please tell.
    But how do I use it? Can someone please explain where it goes and will it work on several child SWF's?
    Thanks in advance.

    Thanks. This is pasted in the HTML yes? You don't have a method for the child SWF's too?
    I've read that the PRAGMA method don't always work and may sometimes only work on the HTML and not the SWF?

  • Is there a way to prevent AnyConnect from caching the username of the last person who connected to the VPN?

    Is there a way to prevent AnyConnect from caching the username of the last  person who connected to the VPN?

    This can be done via specifying the "RestrictPreferenceCaching" parameter as described in the Anyconnect Admin Guide here:
    By design, AnyConnect does not cache sensitive information to disk. Enabling this parameter extends this policy to any type of user information stored in the AnyConnect preferences.
    •Credentials—The user name and second user name are not cached.
    •Thumbprints—The client and server certificate thumbprints are not cached.
    •CredentialsAndThumbprints—Certificate thumbprints and user names are not cached.
    •All—No automatic preferences are cached.
    •false—All preferences are written to disk (default—behavior consistent with AnyConnect 2.3 and earlier).

  • What is impact on SharePoint farm , if we reset the SharePoint Cache from Cache.ini file?

    Hello,
    I am facing issue with usage timer job as described in following link:
    http://www.sharepointgeoff.com/usage-data-import-job-fail-8075-and-execute-method-spusageimportjobdefinition-fail-6398-%E2%80%93-how-to-fix/
    Resolution for my issue in SharePoint 2010 farm is requiring the resetting SharePoint Cache from Cache.ini file.
    Can anyone please let me know whether clearing SharePoint Cache will affect the farm ? What precautions I should take to be at safe side while performing same on production?
    Thanks and Regards,
    Dipti Chhatrapati

    Just recreate your sharepoint timer job files. All these timerjob are actually stored on database but for performance, they are pulled over to SP server and executed from local server.
    No impact unless and until you set the cache.ini value to 0 everytime the folder is clean.
    Yes it is safe to perform this in production.
    Note: Make sure time service is top, cache.ini value to 0 everytime the folder is clean, then delete file, then start the timerjob service. If you dont see the files getting created, you need to troubleshoot on your timerjobs.
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • How do I prevent users from caching their sign in credentials on OWA page

    I am using Forms based authentication and want to prevent users from caching their credentials on the OWA page.
    Is there an easy way?

    Hi,
    Forms-based authentication enables a sign-in page for Outlook Web App that uses a cookie to store a user's encrypted sign-in credentials in the Internet browser. So this authentication method will force to cache their credentials in the Internet
    browser for some time. The workaround is what Willard Martin suggested.
    Refer from
    http://technet.microsoft.com/en-us/library/bb430796(v=exchg.141).aspx
    Best Regards.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

Maybe you are looking for

  • How  do  i  get  programs   to   work  on  a  2nd  account

    When I added a second account for my child so she may play her games without worrying about things getting deleted or misplaced, I found out that her games cannot be found or played on her account. I must go to my main account which defeats the purpo

  • TS1702 I got charged for a rental and a movie on my credit card but it was never done.

    Hi, On 04-11-2014 i got charged $9.99 for a MC PURCHASE 55429504 PAYPAL *ITUNESSTORE 4029357733 CA 2014-04-11 08.28.04 (thats what it says i Was charged for.  I never did that. it says the order is pending and that it used my debit...... i did not do

  • Opening a response PDF in Acrobat Reader 9 or 10

    I am very new to LC ES3.  I just created a fillable form and distributed it and when I tested the Submit button I did get the responses in my response folder, but after trying to open it in Adobe Reader 9 and X it did not automatically check for new

  • Dynamic Text Box Variables

    Hi, At the moment im using the variable option of a dynamic text box to load text. The variable is loaded into the swf via an external htm file that has multiple variables in it (i dunno if that makes sense but you know how you can load in a set of v

  • Stop sending signal to external display without unplugging the cable

    Stupid question: if I toggle through the display settings (F7), it doesn't seem as if any go to shutting off the external display (like maybe I want to make a change I don't want my audience to see, I would like to shut it off without unplugging, the