Hi All,
Here is a question regarding the
applet and
servlet communication. Applet is used for uploading the file.
We have a third party applet which converts the office documents into pdf and send to our application (Servlet). This applet provides a window on which it displays the status of upload and cancel button.
1)Problem is if user presses cancel is there a way for Servlet to know that complete file was not uploaded?
Here is my servlet code.
InputStream inputStream = null;
ByteArrayOutputStream out = null;
inputStream = request.getInputStream();
out = new ByteArrayOutputStream();
byte buf[]=new byte[1024];
int len;
while((len=inputStream.read(buf))>0){
out.write(buf,0,len);
}
2) Can applet tell the servlet that file upload was cancelled, if yes how?
Looking forward for your answer and Thanks in advance.
Best Regards
Prasad