RE: [bug report] servlet's twice calling
Hi, can it be that it depends on the user-agent (=browser)? I have allways seen the problem (sporadically appear) when using a netscape 4.x browser. And it appeared on different webservers. It is not even necessary that it is a servlet-call. cheers Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 6:45 PM To: [EMAIL PROTECTED] Subject: Re: [bug report] servlet's twice calling Well, I'm using 3.2.2beta, but we do file uploads and don't see double postings at all. It would seem like a serious problem, though, to have double POST calls done since that would result in two transactions. I have seen the opposite, though, when serving up a file that was uploaded, I've noted that there are two GET requests done. It seems like some browsers, perhaps, are doing an initial get (to get the last modified date?), then close the request and do another to actually retrieve the file. But it's not consistent, and I suspect it's a browser thing... David
Re: [bug report] servlet's twice calling
Well, I'm using 3.2.2beta, but we do file uploads and don't see double postings at all. It would seem like a serious problem, though, to have double POST calls done since that would result in two transactions. I have seen the opposite, though, when serving up a file that was uploaded, I've noted that there are two GET requests done. It seems like some browsers, perhaps, are doing an initial get (to get the last modified date?), then close the request and do another to actually retrieve the file. But it's not consistent, and I suspect it's a browser thing... David
[bug report] servlet's twice calling
os : unix & windows 2000 servlet container : tomcat 3.2.1 release For the two implementations presented below, requests submitted from the file fileupload.html call up fileUpload2.jsp twice. The file fileUpload2.jsp is called only once when fileupload.html submits a request on other serlet engines(servlet containers). Apparently this is a tomcat bug. The results are identical for UNIX and Windows 2000 systems. ¢Ñ fileupload.html ¢Ñ fileUpload2.jsp <%@ page contentType="text/html; charset=euc-kr" errorPage="error.jsp" import="java.io.*" language="java" %> <% boolean checkFileSize = true; int fileSize = request.getContentLength(); System.out.println("contentLength : " + fileSize); out.println("contentLength : " + fileSize + ""); // limited file size (5MB) if ( fileSize > 1024*1024*5 ) { System.out.println("Large file size"); checkFileSize = false; out.println(""); out.println("alert(\"too large file. retry again...\");"); out.println("history.back();"); out.println(""); out.flush(); } if ( checkFileSize ) { System.out.println("Small file size"); out.println("run file upload"); } System.out.println("end"); %>