Refresh a webpage from a java aplication.

I have a java application used to collect data from a production machine. The information is stored in a database and a php webpage is shown to the user so he can see his works result.

My problem is when the page reloads, it dosen't refresh. What i realy dont understand is that i show the user a temporary page saying that the data is being treated before showing him the result. But when the result is done being treated, the page that pops up is the one of the previous work. To get the new data to show, he has to refresh the page.

I was wondering if there is a way to get the webpage to refresh. I would like to prevent the user from having to manualy refresh the page. Or is there a different way to call the webpage so it refreshes on its own?

Here is the code that calls the webpage :publicstaticvoid openURL(String url){

String osName = System.getProperty("os.name");

try{

if (osName.startsWith("Mac OS")){

Class fileMgr = Class.forName("com.apple.eio.FileManager");

Method openURL = fileMgr.getDeclaredMethod("openURL",new Class[]{String.class});

openURL.invoke(null,new Object[]{url});

}else{

if (osName.startsWith("Windows"))

Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);

else{

// Unix or Linux

String[] browsers ={"firefox","opera","konqueror","epiphany","mozilla","netscape"};

String browser =null;

for (int count = 0; count < browsers.length && browser ==null; count++)

if (Runtime.getRuntime().exec(new String[]{"which", browsers[count]}).waitFor() == 0)

browser = browsers[count];

if (browser ==null)

thrownew Exception("Could not find web browser");

else

Runtime.getRuntime().exec(new String[]{browser, url});

}

}

}catch (Exception e){

JOptionPane.showMessageDialog(MainScreen.getFrames()[0], errMsg +":\n" + e.getLocalizedMessage());

}

}

Thanks

Alex

[3768 byte] By [AlexMaca] at [2007-11-27 8:28:35]
# 1
Have you tried putting a meta refresh tag in the html? I know it's low-tech, but it will probably work.
hunter9000a at 2007-7-12 20:18:37 > top of Java-index,Java Essentials,Java Programming...