From: Alan K. <jyt...@xh...> - 2009-02-15 19:14:44
|
OK, just to clarify .... [Prashant] > I have a web application where from the front end user loads a file > and gives it as input to Java classes. So you have a java servlet which is receiving an uploaded file through HTTP? > The file is given as input to > a python script which converts it into some other format. And the java servlet saves the uploaded file into a file on the local file system? And a jython script is used to transform this file to another format? So this is really a java servlet problem, not a jython problem? > Here I have used the concept of jython. I have no idea what you mean by this. > The file is converting properly in the parent > directory of Tomat but with some of the data which is missed.The problem is > when I close the tomcat,then additional data is added to the converted file > which > completes the correct conversion. > I want to know whether some internal buffer of Tomcat is holding the extra > data. > If so how to retrieve it. So whatever java code you have is not reading the full file contents from the upload? Uploaded content is available through a ServletInputStream, which *must* be read until the end, i.e. until whichever read() method used returns -1. Is this the case with your java servlet? http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletInputStream.html Regards, Alan. |