Hello
I’m trying to load an XML after update it calling a jsp function. I load the XML each 10 seconds to update the grid with new information. The problem is when I try to re-write the file (I use the FileOutputStream class). I obtain the following error:
java.io.FileNotFoundException: webapps\PFC\resultados\resultados.xml (La operacion solicitada no se puede realizar en un archivo con una seccion asignada a usuario abierta)
It only happens when I call to the loadXML function before re-write the file and I don’t know how to solve it.
Sorry about my english.
Thank you,
Oscar.
Problem may be caused by call concurrency - you have two scripts which both require access to the same file, so it possible that while one script uses file , second can’t access it.
Actually you need not to use static file at all, now you have next scheme
script1
grid.loadXML(“static.xml”)
script2
… build XML string …
… write XML string …
but you can change it as
script1
grid.loadXML(“script2”)
script2
… build XML string …
… output XML …
In such case you will load XML text directly from second script without necessity to have static XML file.
Thanks for the answer but I have solved it. It was a problem with jetty server configuration. I copy the link to help anybody who has the same problem:
docs.codehaus.org/display/JETTY/ … on+Windows