1

We have an old windows xp machine with no internet access (cannot be upgraded). Currently we have the following logic in place:

  1. System generate an txt file based on user modifications via intranet.
  2. Java read the txt file and generates a formatted HTML file using freemarker every 20 seconds.
  3. The generated HTML file is opened in the morning and kept open all day for users to view, HTML has an auto refresh of every 10 seconds to reload the new HTML file generated in step 2.

Ideally there won't be any user interactions on this machine.

I want to eliminate the discrepancy by having the HTML check either the checksum of the txt file or HTML file. Refresh once it detects a change.

The limiting factors are it needs to be IE 6 compatible and ideally with something that is built-in for windows xp (javascript?)

Thanks!

tom
  • 445
  • 4
  • 20

1 Answers1

0

What about this approach..

  1. When java detects that the date or the checksum of the txt file has changed then it will generate markup with the new content of the txt file.

  2. When java has finished creating the markup, it could run a batch file which will refresh a currently open ie6 window..

Im not sure if a batch file can refresh an allready open ie6 window, but I assume it should be possible. An alternative to that could be to close the browser and reopen with the updated html page as target.

This link could be usefull to run the batch file in java: How do I run a batch file from my Java Application?

You might wanna do some research if the batch file can refresh an allready open ie window.

NB. A batch file can be executed with the command promt in windows xp

Community
  • 1
  • 1
IceCode
  • 1,466
  • 13
  • 22
  • 1
    I will check on how to use batch to refresh an open IE6 window. I do not want to close and reopen because it would refresh every 5 minutes and I am assuming the flicker during close and reopen could get annoying (also need to toggle it full screen after opening). Thanks! – tom Mar 08 '17 at 19:44
  • oops sorry I meant 5 seconds in the previous comment. – tom Mar 08 '17 at 21:33