• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are the best ways to upload a file to an App Server  RSS feed

 
Srinivasa Maddi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

My manager asked me to suggest some best ways to upload any kind of file to an AppServer (any protocol is ok). But he want me to justify the reason for whatever the way i suggest. I dunno how to answer him. The client can be either in intranet or internet. Can anyone help me

Regards,
Srinivasa
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the application include a web app part? If so, I'd think that using an HTML forum that is handled by a file upload component (like Apache Commons FileUpload) on the server is probably the easiest to set up and get working, and doesn't need anything special on the client (beyond a browser, obviously).
 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a great Java library here. Use MultipartRequest class for basic upload operations.
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Besides HTTP, FTP can be a good protocol to use. Its main (sole?) purpose is to handle file transfers - both download and upload. You can even secure it some more using SFTP.

There's also SMB or Windows Sharing, but that's quite insecure over the internet.
 
Srinivasa Maddi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all.
Rob, can you tell me if i go for SFTP, what all parameters (i.e server name, user, password, etc ) do i need to know.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See here and here, basically you'd normally provide SSH key exchange OR username/password (key exchanges are considered more secure), server and port. Also see the Jsch java library if you want to do this from Java, it simplifies things a good deal
 
Mike Payne
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a similar thread that was closed, one of the bartenders indicated that Apache Commons net supports SFTP, yetApache Commons Net lists FTPS, not SFTP, and I see classes in the JavaDocs to support FTPS, but none (explicitly) referencing SFTP. Could someone explain how the Commons net library is used with SFTP?

Thanks!
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe that Apache Net does support SFTP (although it could easily one day). JSch seems to be the default that most people use (warning their source code and documentation is um interesting).
 
Mike Payne
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion. It looks like this would work for our purposes, but with the lack of documentation, etc. it might be a bit difficult (and thus costly to the customer) to implement. What I saw at: About JSch Open Source Project gave me pause. What about Trilead SSH for Java? Might it be easier to implement, or does it have its own set of issues?

Thanks again,

Mike
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about Trilead, never used it. Jsch does seem to be the defacto standard.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!