Upload failed : java.net.ConnectException: Connection refuse

Upload core product.
Post Reply
dubis
Posts: 5
Joined: Wed Jun 11, 2008 7:43 am

Upload failed : java.net.ConnectException: Connection refuse

Post by dubis »

Hello,

I think I installed well JUpload on my server.
When I try http://myserver.com/applet_http.html in my browser.
That load the applet, prompt for a security pop-up, I accept and this display the applet UI with panel, progress bar and button. I can explore my workstation disk. But when I want to upload a file I've got an error message in the JUpload applet :

Upload started ...Upload failed : java.net.ConnectException: Connection refused

Could you help thank

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

Re: Upload failed : java.net.ConnectException: Connection refuse

Post by support »

Did you setup "url" parameter in applet_http.js ? "url" parameter must be the server-side script that will handle upload requests (i.e. save file into a folder on server).

We provide free sample script at:
http://www.jfileupload.com/products/tools/index.html

Does it help ?

dubis
Posts: 5
Joined: Wed Jun 11, 2008 7:43 am

Re: Upload failed : java.net.ConnectException: Connection refuse

Post by dubis »

I created a new directory where is the index.html is installed
$PATH_HTTPD/docs/tmp
I put new restriction like this :
drwxrwxrwx   2 nobody   nogroup      512 Sep 25 09:19 tmp

I modify these following lines of applet_http.js  :
  document.write('url="http://localhost:8080/upload/process.jsp" ');
../..
document.writeln('<PARAM NAME="url"
VALUE="http://localhost:8080/upload/process.jsp">');

by these ones :
  document.write('url="http://myserver.org/tmp" ');
.../...
document.writeln('<PARAM NAME="url" VALUE="http://myserver.org/tmp">');

When I upload a file to the server, i've got this following error message :
Select or drag and drop file to upload
--------------------------------------------------
Uploading : File.pdf
(428 444 bytes)
Upload started ...Server error HTTP/1.1 302 Moved Temporarily

Could you help ?

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

Re: Upload failed : java.net.ConnectException: Connection refuse

Post by support »

Creating docs/tmp folder is not enough. You do need a server-side script to handle upload requests.
Does your web server support PHP ? If so then use PHP Script at:
http://www.jfileupload.com/products/tools/index.html

dubis
Posts: 5
Joined: Wed Jun 11, 2008 7:43 am

Re: Upload failed : java.net.ConnectException: Connection refuse

Post by dubis »

My server doesn't support PHP. This is a JAVA server from SUN.

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

Re: Upload failed : java.net.ConnectException: Connection refuse

Post by support »

Ok, so you could use JSP upload script:
http://www.jfileupload.com/products/too ... oad2.1.zip

1 - Once downloaded, rename jspupload2.1.zip into upload.war
2 - Then open your Java server web console, deploy the WAR file.
3 - Then go into the directory where the WAR has been deployed, edit process.jsp
and setup "directory" and "tmpdirectory" folders at the top of the file.
4 - Try http://yourserver.com/upload/process.jsp in your browser and upload one file.
5 - If it works, then you can install JFileUpload.
6 - Copy JFileUpload files and folder under the upload/ folder
7 - Setup "url" parameters in applet_http.js with http://yourserver.com/upload/process.jsp
8 - Try the applet in browser with http://yourserver.com/upload/applet_http.html

Post Reply