Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTPClient Applet Problem on HP-UX

 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have recently ported a project to a HP-UX machine and am having problems with an Applet that uses the FTPClient class.

It throws a 'Connection timed out: connect' exception on this line:

ftp = new FTPClient(server);

I have tried ftping from the HP-UX machine to the destination address and that works fine. Something goes wrong when the applet tries with the same details.

Any help would be brilliant!

Thanks,

Keith.
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh and the applet works fine locally.
 
Paul Clapham
Sheriff
Posts: 21321
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused. Is the applet running on the HP-UX machine or is it being served from that machine and running somewhere else? And what does "locally" mean?
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default, an applet can only connect to the server that 'served' the applet. Connecting to any other server will fail.
If you want to extend the capabilities of an applet, you have to sign it.
Read more from Sun.

Regards, Jan
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
I'm confused. Is the applet running on the HP-UX machine or is it being served from that machine and running somewhere else? And what does "locally" mean?


It is running on the HP-UX machine.
by locally i mean it worked fine before porting to HP-UX
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jan Cumps:
By default, an applet can only connect to the server that 'served' the applet. Connecting to any other server will fail.
If you want to extend the capabilities of an applet, you have to sign it.
Read more from Sun.

Regards, Jan


I have signed the applet. So it should be able to connect as the server details are hard coded in the applet
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Maybe it has to do withg the fact that the code does not run as a super user (if you run the browser, and the applet, with an other user then when you run the local test)?

See this info: on UNIX, port numbers below 1024 are reserved for super-user.

Regards, Jan
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. The HP-UX machine was on another network, which has tight security. So the network security stopped the Applet from performing the ftp connection, at least when i tried to access the page from here. It worked fine for users on the other network.
I'm going to read that java security page anyways, Thanks guys!
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. The HP-UX machine was on another network, which has tight security. So the network security stopped the Applet from performing the ftp connection, at least when i tried to access the page from here. It worked fine for users on the other network.
I'm going to read that java security page anyways, Thanks guys!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic