Jignesh Shah wrote:
1. I see the file in the directory but when I access it, it gives me
Sharing Violation error. If I logout of my Form Based Authentication
implemented (Servlet is in that system) system I am able to access the
pdf correctly. Does anybody know how I can release the file once the
file has been generated
Closing the file output stream should be enough. If you still
have the problem even after the file has been written and the
stream has been closed, experiment a bit:
- Use the FileOutputStream(dir+sep+file_is) constructor
- Close the file explicitely
- Set both fos and file to null to give the GC a chance to
reclaim the objects.
If neither helps, ask on a general Java list.
2. After getting the FileOutputStream it starts writing to the file. At
the same time it generates a "socket connection reset by peer
exception". I don't know why this exception is generated.
This typically happens when the browser times out and hangs
up. You should pass something to the servlet response output
stream if you want avoid this.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]