users@glassfish.java.net

Re: File Write on Server Problem in Web Service

From: <glassfish_at_javadesktop.org>
Date: Mon, 07 Jan 2008 11:23:05 PST

You never close the file. Everytime you run the web service, you create a stream, which overwrites the file. You then put data in to that stream, and return from the webservice.

Since you don't close the stream, and most streams are buffered, the contents are never written to the file and the stream is left dangling, waiting to be finalized by the GC.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=252564