How to Edit files using web application

472 views Asked by At

All,

I have a requirement where user would like to edit the files using web application. I know there would be a concurrency issues. But i want to know if there is a way to do it efficiently in the web application, may be using Jython or any other framework.

Any help or other framework which can help with this is really appreciable.

1

There are 1 answers

0
Feign On BEST ANSWER

A simple solution to the concurrency issue you talk about is to save a datetime stamp each time the file is edited from anywhere.

Now, if a user tries to save his changes to a file, check the datetime stamp and make sure that the current edit's datetime stamp is greater than the last edit. If it is not, then you know the file has been changed and the user should reload the file, make his changes again, then attempt to save again.