Download specific file

Files and folders downloader add-on with resume support.
Post Reply
yse
Posts: 7
Joined: Tue Jun 28, 2011 11:45 am

Download specific file

Post by yse »

Hi,

Want to download a file located at: http://99.99.99.99/ftstest/E0057/out/MKD2010026.TXT

I have tried different settings but nothing works. What can be the problem?

Latest parameters used:

Code: Select all

PARAM NAME="url" VALUE="http://99.99.99.99/FTStest/process.jsp"
PARAM NAME="item1" VALUE="MKD2010026.TXT"                              
PARAM NAME="param2" VALUE="relativefilename"                          
PARAM NAME="value2" VALUE="true"                                      
PARAM NAME="param3" VALUE="account"                                   
PARAM NAME="value3" VALUE="ftstest/E0057/out"                         
PARAM NAME="folderdepth" VALUE="-1"                                
PARAM NAME="encoding" VALUE="ISO-8859-1"                              
PARAM NAME="transferui" VALUE="jfileupload.download.ui.DownloadTransferUI"
PARAM NAME="resources" VALUE="i18n_bar"                          
PARAM NAME="transferuiresources" VALUE="i18n_pane"                   
PARAM NAME="mode" VALUE="jfileupload.download.http.HTTPDownloadTransfer"
Applet response:
Download failed: MKD2010026.TXT not found

Java Console output:

[INFO] MApplet - JFileUpload 2.8 Build FINAL.001
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[INFO] Conf - TransferUI instantiated : jfileupload.download.ui.DownloadTransferUI
[INFO] DownloadTransferUI - JFileDownload 2.8 FINAL.001
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[INFO] HTTPDownloadTransfer - Download failed


Thanks

yse
Posts: 7
Joined: Tue Jun 28, 2011 11:45 am

Re: Download specific file

Post by yse »

Hi,

added PARAM NAME="verbosemode" VALUE="trace" with below result:
What can the "HTTP/1.1 403 Forbidden" and "Error 403: Error reported: 403" mean?

I have verified different authorities and not found any problems in that area.
The file I want to download is possible to access and view from the browser.

[INFO] MApplet - JFileUpload 2.8 Build FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = Jakarta Commons-HttpClient/3.1
[DEBUG] DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
[DEBUG] DefaultHttpParams - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
[DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy = default
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = US-ASCII
[DEBUG] DefaultHttpParams - Set parameter http.protocol.content-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1462851
[DEBUG] DefaultHttpParams - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
[DEBUG] HttpClient - Java version: 1.5.0_22
[DEBUG] HttpClient - Java vendor: Sun Microsystems Inc.
[DEBUG] HttpClient - Java class path: C:\PROGRA~1\Java\JRE15~1.0_2\classes
[DEBUG] HttpClient - Operating system name: Windows Vista
[DEBUG] HttpClient - Operating system architecture: x86
[DEBUG] HttpClient - Operating system version: 6.0
[DEBUG] HttpClient - SUN 1.5: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
[DEBUG] HttpClient - SunRsaSign 1.5: Sun RSA signature provider
[DEBUG] HttpClient - SunJSSE 1.5: Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
[DEBUG] HttpClient - SunJCE 1.5: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
[DEBUG] HttpClient - SunJGSS 1.0: Sun (Kerberos v5)
[DEBUG] HttpClient - SunSASL 1.5: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@b76fa
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - relativefilename:true
[DEBUG] F - account:ftstest/E0057
[INFO] Conf - TransferUI instantiated : jfileupload.download.ui.DownloadTransferUI
[INFO] DownloadTransferUI - JFileDownload 2.8 FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@17e121c
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - relativefilename:true
[DEBUG] F - account:ftstest/E0057
[DEBUG] HttpConnection - Open connection to 99.99.99.99:80
[DEBUG] header - >> "POST /FTStest/process.jsp HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "filesystem: jfileupload.download.http.HTTPRemoteTFileSystem[\r][\n]"
[DEBUG] header - >> "User-Agent: JFileUpload[\r][\n]"
[DEBUG] header - >> "Host: 99.99.99.99[\r][\n]"
[DEBUG] header - >> "Content-Length: 32[\r][\n]"
[DEBUG] header - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] content - >> "cmd=list&val1=%2Fftstest%2FE0057"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 403 Forbidden[\r][\n]"
[DEBUG] header - << "HTTP/1.1 403 Forbidden[\r][\n]"
[DEBUG] header - << "Date: Thu, 30 Jun 2011 08:53:52 GMT[\r][\n]"
[DEBUG] header - << "Server: WebSphere Application Server/6.0[\r][\n]"
[DEBUG] header - << "$WSEP: [\r][\n]"
[DEBUG] header - << "Set-Cookie: JSESSIONID=0000jW5Jms9soJNHxFynxgs8TUy:-1; Path=/[\r][\n]"
[DEBUG] header - << "Transfer-Encoding: chunked[\r][\n]"
[DEBUG] header - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Language: en-SE[\r][\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodBase - Cookie accepted: "$Version=0; JSESSIONID=0000jW5Jms9soJNHxFynxgs8TUy:-1; $Path=/"
[DEBUG] content - << "1"
[DEBUG] content - << "f"
[DEBUG] content - << "[\r]"
[DEBUG] content - << "[\n]"
[DEBUG] content - << "Error 403: Error reported: 403[\n]"[DEBUG] content - << "[\r]"
[DEBUG] content - << "[\n]"
[DEBUG] content - << "0"
[DEBUG] content - << "[\r]"
[DEBUG] content - << "[\n]"
[DEBUG] content - << "[\r]"
[DEBUG] content - << "[\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
[DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
[DEBUG] HttpConnection - Releasing connection back to connection manager.
[INFO] HTTPDownloadTransfer - Download failed
Thanks

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Download specific file

Post by support »

403 = Forbidden. It means the URL is protected. Are you able to access the process.jsp directly in browser?

yse
Posts: 7
Joined: Tue Jun 28, 2011 11:45 am

Re: Download specific file

Post by yse »

Yes, it shows "Select a file to upload:" and a Browse, Upload and Cancel button.

yse
Posts: 7
Joined: Tue Jun 28, 2011 11:45 am

Re: Download specific file

Post by yse »

Have reinstalled everyting to my server and HTTP file upload works OK, both with direct access to process.jsp and via applet_http.html.

Still problem with HTTP download.
Want to download a file located at: http://99.99.99.99/ftstest/E0057/out/MKD2010026.TXT
Code used:

Code: Select all

document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/download.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="http://99.99.99.99/FTStest/jspupload/process.jsp">');
document.writeln('<PARAM NAME="item1" VALUE="MKD2010026.TXT">');
document.writeln('<PARAM NAME="param2" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value2" VALUE="true">');
document.writeln('<PARAM NAME="param3" VALUE="account">');
document.writeln('<PARAM NAME="value3" VALUE="ftstest/E0057/out">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="verbosemode" VALUE="trace">');
document.writeln('<PARAM NAME="encoding" VALUE="ISO-8859-1">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.download.ui.DownloadTransferUI">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="mode" VALUE="jfileupload.download.http.HTTPDownloadTransfer">');
JVM output with trace:

Code: Select all

Java Plug-in 1.5.0_22
Använder JRE-version 1.5.0_22 Java HotSpot(TM) Client VM
Användarens hemkatalog = C:\Users\engstrom
----------------------------------------------------
c:   töm systemfönster
f:   slutför objekt i slutföringskö
g:   skräpinsamling
h:   visa det här hjälpmeddelandet
l:   dumpa classloader-lista
m:   skriv ut minnesförbrukning
o:   utlösarloggning
p:   ladda proxykonfiguration på nytt
q:   dölj konsol
r:   ladda policykonfiguration på nytt
s:   dumpa system- och distributionsegenskaper
t:   dumpa trådlista
v:   dumpa trådstack
x:   töm classloader-cache
0-5: ange spårningsnivån till <n>
----------------------------------------------------
[INFO] MApplet - JFileUpload 2.8 Build FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@14e0e90
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - account:ftstest/E0057/out
[INFO] Conf - TransferUI instantiated : jfileupload.download.ui.DownloadTransferUI
[INFO] DownloadTransferUI - JFileDownload 2.8 FINAL.001
[DEBUG] DefaultHttpParams - Set parameter http.useragent = JFileUpload
[DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = ISO-8859-1
[DEBUG] DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@61f533
[DEBUG] F - Auto-detect proxy settings : http.proxyHost = null
[DEBUG] F - Auto-detect proxy settings : http.proxyPort = -1
[INFO] F - Auto-detect proxy settings (ps): DIRECT
[INFO] F - Auto-detect proxy settings : host = null
[INFO] F - Auto-detect proxy settings : port = -1
[DEBUG] F - account:ftstest/E0057/out
[DEBUG] HttpConnection - Open connection to 99.99.99.99:80
[DEBUG] header - >> "POST /FTStest/jspupload/process.jsp HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "filesystem: jfileupload.download.http.HTTPRemoteTFileSystem[\r][\n]"
[DEBUG] header - >> "User-Agent: JFileUpload[\r][\n]"
[DEBUG] header - >> "Host: 99.99.99.99[\r][\n]"
[DEBUG] header - >> "Content-Length: 38[\r][\n]"
[DEBUG] header - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] content - >> "cmd=list&val1=%2Fftstest%2FE0057%2Fout"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Date: Thu, 25 Aug 2011 10:16:35 GMT[\r][\n]"
[DEBUG] header - << "Server: WebSphere Application Server/6.0[\r][\n]"
[DEBUG] header - << "Content-Length: 52[\r][\n]"
[DEBUG] header - << "Set-Cookie: JSESSIONID=0000Dak__HxGxkkE1fYwi67EpUS:-1; Path=/[\r][\n]"
[DEBUG] header - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Language: en-SE[\r][\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodBase - Cookie accepted: "$Version=0; JSESSIONID=0000Dak__HxGxkkE1fYwi67EpUS:-1; $Path=/"
[DEBUG] HttpMethodBase - Buffering response body
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[0x9][\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "[\r][\n]"
[DEBUG] content - << "<pre>[\n]"
[DEBUG] content - << "</pre>[\n]"
[DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
[DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
[DEBUG] HttpConnection - Releasing connection back to connection manager.
[INFO] HTTPDownloadTransfer - Download failed
The file to download is located in the "root" filesystem - "/" - on the AS400 server and that´s why I set:
PARAM NAME="param3" VALUE="account"
PARAM NAME="value3" VALUE="ftstest/E0057/out
PARAM NAME="item1" VALUE="MKD2010026.TXT"

Is this correct?

The respons from applet_http_download.html is :

"Download failed: MKD2010026.TXT not found"

Why is the file not found? Have I missed some parameter set up?

The file can be viwed in the browser using http://99.99.99.99/ftstest/E0057/out/MKD2010026.TXT


Thanks in advance

Post Reply