Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doing ftp from a JSP

 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
From my jsp page I want to do an FTP to a mainframe system.
How can I do an ftp from JSP.
I have to ftp to a mainframe system in the same network. i do have the IP, username and password.
Thanks,
Maya
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would use the java.net.URL and java.net.URLConncetion classes:
public URL(String protocol,
String host,
int port,
String file)
throws MalformedURLException

protected URLConnection(URL url)
Constructs a URL connection to the specified URL. A connection to the object referenced by the
URL is not created.
Parameters:
url - the specified URL.

It gets involved and it's not trivial...
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An alternative is to use a free or commercial FTP JavaBeans. There is one here:
http://www.geocities.com/SiliconValley/Code/9129/javabean/ftpbean/
and another here:
http://oss.software.ibm.com/developerworks/opensource/ftp/
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
Thanks for this.
I am trying to use them now
well, do u have a sample code that u can give me
Maya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic