**Upload Photo in WebSphere throw HTTP 404 not Found** **Upload Photo in WebSphere throw HTTP 404 not Found**
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

**Upload Photo in WebSphere throw HTTP 404 not Found**

Started by lam_fung, July 22, 2009, 01:37:11 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

lam_fung

After use Jupload to post to the servlet
it just return 404 not found

But i can upload successfully in the TOMCAT, how come.....

here is the error code and my servlet.......THX*9999999999


16:34:14.676 [INFO] Debug level set to 100
16:34:14.816 [INFO] Current debug output file: C:\TEMP\jupload_1757387205948619477_log.txt
16:34:14.816 [DEBUG] setLang - language read (no country): en
16:34:14.826 [DEBUG] nbFilesPerRequest<0 which is invalid. Switched to the default value (Integer.MAX_VALUE)
16:34:14.856 [DEBUG] cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB
16:34:14.866 [DEBUG] userAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
16:34:14.866 [DEBUG] Checking protocol with URL: http://ux13kw:8080/pal2/SaveImage
16:34:14.886 [DEBUG] Cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB
16:34:14.886 [DEBUG] User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
16:34:14.896 [DEBUG] [HTTPConnectionHelper append]
16:34:14.896 [DEBUG] Before sendRequest()
16:34:14.896 [DEBUG] Using non SSL socket, direct connection
16:34:14.906 [DEBUG] After sendRequest()
16:34:14.906 [DEBUG] -------------------------------------------------------------------------
16:34:14.906 [DEBUG] -----------------   HEAD message sent (start)  --------------------------
16:34:14.906 [DEBUG] -------------------------------------------------------------------------
16:34:14.906 [DEBUG] HEAD /pal2/SaveImage HTTP/1.1
16:34:14.906 [DEBUG] Host: ux13kw
16:34:14.906 [DEBUG] Accept: */*
16:34:14.906 [DEBUG] Accept-Encoding: identity
16:34:14.906 [DEBUG] Connection: close
16:34:14.906 [DEBUG] Cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB
16:34:14.906 [DEBUG] User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
16:34:14.906 [DEBUG]
16:34:14.916 [DEBUG] -------------------------------------------------------------------------
16:34:14.916 [DEBUG] -----------------   HEAD message sent (end) -----------------------------
16:34:14.916 [DEBUG] -------------------------------------------------------------------------
16:34:14.926 [DEBUG] -------- Response Headers Start --------
16:34:14.926 [DEBUG] HTTP/1.1 404 Not Found
16:34:14.936 [DEBUG] Date: Wed, 22 Jul 2009 08:34:14 GMT
16:34:14.936 [DEBUG] Server: IBM_HTTP_Server
16:34:14.936 [DEBUG] Connection: close
16:34:14.936 [DEBUG] Content-Type: text/html; charset=iso-8859-1
16:34:14.936 [DEBUG]
16:34:14.936 [DEBUG] --------- Response Headers End ---------
16:34:14.936 [DEBUG] This is a HEAD request: we don't care about the body
16:34:14.936 [DEBUG] HEAD status: 404
16:34:14.936 [DEBUG] HEAD protocol: HTTP/1.1
16:34:14.946 [DEBUG] [DefaultUploadPolicy] end of constructor (serverProtocol has been set)
16:34:14.946 [DEBUG] [PictureUploadPolicy] end of constructor
16:34:14.946 [DEBUG] uploadPolicy parameter = PictureUploadPolicy
16:34:14.946 [DEBUG] uploadPolicy = wjhk.jupload2.policies.PictureUploadPolicy
16:34:14.946 [DEBUG] =======================================================================
16:34:14.946 [DEBUG] ======= Parameters managed by DefaultUploadPolicy
16:34:14.946 [INFO] JUpload applet, version 4.0.0 [SVN-Rev: 591] (compiled: 01/07/2009 09:50 PM), available at http://jupload.sourceforge.net/
16:34:14.946 [DEBUG] Java version: 1.6.0_11
16:34:14.946 [DEBUG] Cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB
16:34:14.946 [DEBUG] userAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
16:34:14.946 [DEBUG] List of all applet parameters:
16:34:14.946 [DEBUG]   language: en
16:34:14.946 [DEBUG]   country:
16:34:14.956 [DEBUG] afterUploadURL: http://localhost:8080/Pal2/BatchUpload.do?uploaded=ture
16:34:14.956 [DEBUG] allowHttpPersistent: false
16:34:14.956 [DEBUG] allowedFileExtensions: null
16:34:14.956 [DEBUG] browsingDirectory (current value): C:\PHOTO
16:34:14.956 [DEBUG] debugLevel: 100 (debugfile: C:\TEMP\jupload_1757387205948619477_log.txt)
16:34:14.956 [DEBUG] fileChooserIconFromFileContent: 0
16:34:14.956 [DEBUG] fileChooserIconSize: 20
16:34:14.956 [DEBUG] filenameEncoding: null
16:34:14.956 [DEBUG] lang: en
16:34:14.966 [DEBUG] maxChunkSize: 9223372036854775807
16:34:14.966 [INFO] maxFileSize: 1048576
16:34:14.966 [DEBUG] nbFilesPerRequest: 2147483647
16:34:14.966 [DEBUG] postURL: http://ux13kw:8080/pal2/SaveImage
16:34:14.966 [DEBUG] serverProtocol: HTTP/1.1
16:34:14.966 [DEBUG] showLogWindow: true
16:34:14.966 [DEBUG] showStatusbar: false
16:34:14.966 [DEBUG] specificHeaders: null
16:34:14.966 [DEBUG] stringUploadError:
16:34:14.966 [DEBUG] stringUploadSuccess:
16:34:14.966 [DEBUG] stringUploadWarning: ^WARNING: (.*)$
16:34:14.966 [DEBUG] urlToSendErrorTo: null
16:34:14.966 [DEBUG]
16:34:14.966 [DEBUG] ======= Parameters managed by PictureUploadPolicy
16:34:14.966 [DEBUG] fileChooserImagePreview: false
16:34:14.966 [DEBUG] highQualityPreview : false
16:34:14.966 [DEBUG] pictureCompressionQuality : 0.8
16:34:14.976 [DEBUG] pictureTransmitMetadata : false
16:34:14.976 [DEBUG] maxPicWidth : 2147483647, maxPicHeight : 2147483647
16:34:14.976 [DEBUG] realMaxPicWidth : 2147483647, realMaxPicHeight : 2147483647
16:34:14.976 [DEBUG] storeBufferedImage : false
16:34:14.976 [DEBUG] targetPictureFormat : jpg
16:34:14.976 [DEBUG]
16:34:16.027 [DEBUG] [JUploadFileView] Directory changed
16:34:16.118 [DEBUG] Within componentResized
16:34:16.308 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:34:16.308 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:34:18.871 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:35:18.482 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:36:32.323 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:36:34.766 [DEBUG] Action : Browse ...
16:36:36.549 [DEBUG] Creation of the DefaultFileData for C:\PHOTO\Front1.jpg(root: C:\PHOTO)
16:36:36.569 [DEBUG] Mime types list loaded Ok (/conf/mimetypes.properties)
16:36:36.569 [DEBUG] Creation of the DefaultFileData for C:\PHOTO\Front1.jpg(root: C:\PHOTO)
16:36:36.579 [DEBUG] isPicture=true (Front1.jpg), extension=jpg
16:36:36.639 [DEBUG] PicturePanel.paint(): offscreenImage is null
16:36:38.902 [DEBUG] Action : Upload
16:36:38.912 [DEBUG] DefaultFileUploadThread created
16:36:38.912 [DEBUG]   Using wjhk.jupload2.upload.FileUploadThreadHTTP
16:36:38.912 [DEBUG] Upload done by using the wjhk.jupload2.upload.FileUploadThreadHTTP class
16:36:38.912 [DEBUG] Start of the FileUploadThread
16:36:38.922 [DEBUG] Start of the FileUploadManagerThread
16:36:38.922 [DEBUG] Timer started
16:36:38.922 [DEBUG] ============== Start of file preparation (Front1.jpg)
16:36:39.012 [DEBUG] Resizing factor (scale): 1342177.279375
16:36:39.012 [DEBUG] Using transformed temp file C:\TEMP\jupload_4480460312983243435.tmp for Front1.jpg
16:36:39.022 [DEBUG] ImageWriter1 (used), CompressionQuality=0.8
16:36:39.022 [DEBUG] Reading image with imageWriterHelper.readImage(i)
16:36:39.022 [DEBUG] [getWorkingSourceFile] Creating a copy of Front1.jpg as a source working target.
16:36:39.022 [DEBUG] Using working copy temp file C:\TEMP\jupload_58829872614545215.tmp.jpg for Front1.jpg
16:36:39.042 [DEBUG] Foud one reader for jpg extension
16:36:39.062 [DEBUG] Nb images in Front1.jpg: 1
16:36:39.062 [DEBUG] ImageReaderWriterHelper: reading picture number 0 of file Front1.jpg
16:36:39.192 [DEBUG] getBufferedImage: start
16:36:39.192 [DEBUG] getBufferedImage: Picture is now rescaled
16:36:39.192 [DEBUG] getBufferedImage: BufferedImage@e45b5e: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@2ab653 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 1200 height = 1600 #numDataElements 3 dataOff[0] = 2
16:36:39.192 [DEBUG] getBufferedImage: MinX=0
16:36:39.192 [DEBUG] getBufferedImage: MinY=0
16:36:39.202 [DEBUG] getBufferedImage: was 10 ms long
16:36:39.282 [DEBUG] freeMemory (after ImageHelper.getBufferedImage()) : 32437320
16:36:39.483 [DEBUG] ============== End of file preparation (Front1.jpg)
16:36:39.553 [DEBUG] Before do upload
16:36:39.593 [DEBUG] file 0: content=120200 bytes, getAdditionnalBytesForUpload=1082 bytes
16:36:39.593 [DEBUG] chunkHttpParam: jupart=0&jufinal=1
16:36:39.593 [DEBUG] Cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB
16:36:39.593 [DEBUG] User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
16:36:39.593 [DEBUG] [HTTPConnectionHelper append] Content-Type: multipart/form-data; boundary=
16:36:39.593 [DEBUG] [HTTPConnectionHelper append] ---------------------------mhgbap3smii
16:36:39.593 [DEBUG] [HTTPConnectionHelper append]
16:36:39.593 [DEBUG] [HTTPConnectionHelper append] Content-Length:
16:36:39.593 [DEBUG] [HTTPConnectionHelper append] 121282
16:36:39.593 [DEBUG] [HTTPConnectionHelper append]
16:36:39.593 [DEBUG] [HTTPConnectionHelper append]
16:36:39.593 [DEBUG] [HTTPConnectionHelper append]
16:36:39.593 [DEBUG] Using non SSL socket, direct connection
16:36:39.603 [DEBUG] === main header (len=375):
16:36:39.603 [DEBUG] POST /pal2/SaveImage HTTP/1.1\r\n
16:36:39.603 [DEBUG] Host: ux13kw\r\n
16:36:39.603 [DEBUG] Accept: */*\r\n
16:36:39.603 [DEBUG] Accept-Encoding: identity\r\n
16:36:39.603 [DEBUG] Connection: close\r\n
16:36:39.603 [DEBUG] Cookie: JSESSIONID=7AB63453A2FA7B2AFF2B7B17FBCD69DB\r\n
16:36:39.603 [DEBUG] User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
16:36:39.603 [DEBUG] Content-Type: multipart/form-data; boundary=---------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Length: 121282\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] === main header end
16:36:39.603 [DEBUG] --- fileheader start (len=843):
16:36:39.603 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Disposition: form-data; name="mimetype[]"\r\n
16:36:39.603 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
16:36:39.603 [DEBUG] Content-Type: text/plain; UTF-8\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] image/jpeg\r\n
16:36:39.603 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Disposition: form-data; name="pathinfo[]"\r\n
16:36:39.603 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
16:36:39.603 [DEBUG] Content-Type: text/plain; UTF-8\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] C:\PHOTO\r\n
16:36:39.603 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Disposition: form-data; name="relpathinfo[]"\r\n
16:36:39.603 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
16:36:39.603 [DEBUG] Content-Type: text/plain; UTF-8\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Disposition: form-data; name="filemodificationdate[]"\r\n
16:36:39.603 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
16:36:39.603 [DEBUG] Content-Type: text/plain; UTF-8\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.603 [DEBUG] 22/05/2009 13:17:46\r\n
16:36:39.603 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.603 [DEBUG] Content-Disposition: form-data; name="File0"; filename="Front1.jpg"\r\n
16:36:39.603 [DEBUG] Content-Type: image/jpeg\r\n
16:36:39.603 [DEBUG] \r\n
16:36:39.613 [DEBUG] --- fileheader end
16:36:39.613 [DEBUG] in UploadFileData.uploadFile (amount:120200, getUploadLength(): 120200)
16:36:39.683 [DEBUG] --- filetail start (len=239):
16:36:39.683 [DEBUG] \r\n
16:36:39.683 [DEBUG] -----------------------------mhgbap3smii\r\n
16:36:39.683 [DEBUG] Content-Disposition: form-data; name="md5sum[]"\r\n
16:36:39.683 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
16:36:39.683 [DEBUG] Content-Type: text/plain; UTF-8\r\n
16:36:39.683 [DEBUG] \r\n
16:36:39.683 [DEBUG] 205310a4d1289b4d8a4878b4ef54d320\r\n
16:36:39.683 [DEBUG] -----------------------------mhgbap3smii--\r\n
16:36:39.683 [DEBUG] --- filetail end
16:36:39.683 [DEBUG] -------- Response Headers Start --------
16:36:39.693 [DEBUG] HTTP/1.1 404 Not Found
16:36:39.693 [DEBUG] Date: Wed, 22 Jul 2009 08:36:39 GMT
16:36:39.693 [DEBUG] Server: IBM_HTTP_Server
16:36:39.693 [DEBUG] Content-Length: 279
16:36:39.693 [DEBUG] Connection: close
16:36:39.693 [DEBUG] Content-Type: text/html; charset=iso-8859-1
16:36:39.693 [DEBUG]
16:36:39.693 [DEBUG] --------- Response Headers End ---------
16:36:39.693 [DEBUG] -------- Response Body Start --------
16:36:39.693 [DEBUG] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
16:36:39.693 [DEBUG] <html><head>
16:36:39.693 [DEBUG] <title>404 Not Found</title>
16:36:39.693 [DEBUG] </head><body>
16:36:39.693 [DEBUG] <h1>Not Found</h1>
16:36:39.693 [DEBUG] <p>The requested URL /pal2/SaveImage was not found on this server.</p>
16:36:39.693 [DEBUG] <hr />
16:36:39.693 [DEBUG] <address>IBM_HTTP_Server Server at ux13kw Port 80</address>
16:36:39.693 [DEBUG] </body></html>
16:36:39.693 [DEBUG] -------- Response Body End --------
16:36:39.703 [DEBUG] HTTP status: 404 Not Found
16:36:39.713 [ERROR] [wjhk.jupload2.exception.JUploadExceptionUploadFailed] Received HTTP status 404 Not Found
16:36:39.713 [ERROR]  (Received HTTP status 404 Not Found
16:36:39.713 [ERROR] )
16:36:39.713 wjhk.jupload2.exception.JUploadExceptionUploadFailed: Received HTTP status 404 Not Found
16:36:39.713
16:36:39.713 at wjhk.jupload2.policies.DefaultUploadPolicy.checkUploadSuccess(DefaultUploadPolicy.java:608)
16:36:39.713 at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:519)
16:36:39.713 at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:378)
16:36:39.713 at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:296)
16:36:39.753 [DEBUG] FileUploadManagerThread: in afterUploadOk()




  try{
    Enumeration paraNames = request.getParameterNames();
    while (paraNames.hasMoreElements()) {
      String pname = (String)paraNames.nextElement();
      System.out.println(pname + " = " + request.getParameter(pname));
    }
    int ourMaxMemorySize  = 10000000;
    int ourMaxRequestSize = 2000000000;
    HttpSession session = request.getSession();
    DiskFileItemFactory factory = new DiskFileItemFactory();
// Set factory constraints
// factory.setSizeThreshold(ourMaxMemorySize);
// factory.setRepository(new File("\\opt\\pal2"));
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
FileItem fileItem;

try{


int counter = 0;
while (iter.hasNext()) {
    fileItem = (FileItem) iter.next();
    if (fileItem.isFormField()) {
    System.out.println(fileItem.getFieldName() + " = " + fileItem.getString());
    } else {
    System.out.println("FieldName: " + fileItem.getFieldName());
    System.out.println("File Name: " + fileItem.getName());
    System.out.println("ContentType: " + fileItem.getContentType());
    System.out.println("Size (Bytes): " + fileItem.getSize());
   
        }
}


}catch (Exception e){
System.out.println(" ------------Step Error 1------------------ ");
e.printStackTrace();
conn.rollback();
}finally {
try { if (conn != null) conn.close();} catch (Exception e) { e.printStackTrace();}
try { if (stmt != null) stmt.close();} catch (Exception e) { e.printStackTrace();}
}

  }catch(Exception e){
  System.out.println("Exception e = " + e.toString());
  }

etienne_sf

Hi,

  This forum is relative to the JUpload plugin for Coppermine.




I guess your issue is relative to the applet itself.

The relevant forum, to get support is then:
https://sourceforge.net/forum/forum.php?forum_id=199107


Then, you can read a lot of info on the net: 404 means the page doesn't exist. Your postURL is probably wrong.

Etienne