| Author |
Getting fresh copy of file on a web server
|
Bob Chad
Greenhorn
Joined: May 20, 2010
Posts: 19
|
|
Hello,
I have a problem retrieving the lastest copy of a file on a server. It seems to be a cache problem.
I solved the problem when reading .TXT files by using this
urlConn.setUseCaches(false) forces Java to reload the file from the server
I have a problem when reading XML files, Java will load the XML file from the web server ONCE only.
How can I force Java to reload ?
Here's my code
If call this code once in my program, it works,
I delete the XML file from the server,
I call this code again using a refresh button,
it still works (??)
Thanks for your help
|
 |
Bob Chad
Greenhorn
Joined: May 20, 2010
Posts: 19
|
|
Ok so this is how to do it. We need to use InputSource
import org.xml.sax.InputSource;
|
 |
 |
|
|
subject: Getting fresh copy of file on a web server
|
|
|