Righto here is the scene....
Say a bloke is inputing his details name, address etc into a form, he comes to a drop down menu that has his country of origin in it, but he is from a new country eg the independant state of Scotland... doh stuck
What we do is update the db that contains all the countries of the world adding in Scotland. We then have a servlet that takes the info from the db and adds all this to a .js file.
But cause this is a web based application for an intranet and personal details will be added/updated/deleted a few hundred times a day we don't want to have to create this .js file everytime. What we want to do is have the countries0001.js file incremented everytime it is updated and when a newer version is not needed the user will just receive the version that is stored in there browser cache.
So what I have to do is find out;
1) How to create the .js file from a servlet... don't need to know how to update cause each time I'll just create a new one.
2) How to ensure that the client's request will not result each time in a new .js file being created... We are using XML/XSL so what i'll do is just add the new .js file name eg countries0002.js to the xsl <script src="countries0002.js> tag.
I am gonna be using the this idea for things other than a 'countries' drop-down which will mibbie need updating a few times a day... just incase anybody thinks it's a stupid example.
If anyone has any idea how I can start tackling this problem it would be much appreciated.
Chris
Say a bloke is inputing his details name, address etc into a form, he comes to a drop down menu that has his country of origin in it, but he is from a new country eg the independant state of Scotland... doh stuck
What we do is update the db that contains all the countries of the world adding in Scotland. We then have a servlet that takes the info from the db and adds all this to a .js file.
But cause this is a web based application for an intranet and personal details will be added/updated/deleted a few hundred times a day we don't want to have to create this .js file everytime. What we want to do is have the countries0001.js file incremented everytime it is updated and when a newer version is not needed the user will just receive the version that is stored in there browser cache.
So what I have to do is find out;
1) How to create the .js file from a servlet... don't need to know how to update cause each time I'll just create a new one.
2) How to ensure that the client's request will not result each time in a new .js file being created... We are using XML/XSL so what i'll do is just add the new .js file name eg countries0002.js to the xsl <script src="countries0002.js> tag.
I am gonna be using the this idea for things other than a 'countries' drop-down which will mibbie need updating a few times a day... just incase anybody thinks it's a stupid example.
If anyone has any idea how I can start tackling this problem it would be much appreciated.
Chris