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

accesing data from an IP address

 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I have developed a web application which is deployed on the webserver, now our LAN has 6 computers attached.IP Addresses of these computers is known to me. Now this application will keep on fetching the data after every 2 secs from all the PCs in this network, go to a particular folder in each of the computers and read the most recent file and upload its details to the database simultaneously.How to build this kind of application? Totally in a confused state of mind.Some code snippets or tutorials will be of great help.Please reply ASAP.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonal,
suppose I have developed a web application which is deployed on the webserver, now our LAN has 6 computers attached.IP Addresses of these computers is known to me. Now this application will keep on fetching the data after every 2 secs from all the PCs in this network, go to a particular folder in each of the computers and read the most recent file and upload its details to the database simultaneously.How to build this kind of application? Totally in a confused state of mind.Some code snippets or tutorials will be of great help.Please reply ASAP.

I am not getting your question completely because first you say web server and
then LAN. How are they related.Please explain
Time being, it seems that you need some socket programming for your LAN.

Hope this helps
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of access does the server have to those machines? If this is purely about files, I'd say either shared directories or FTP might work.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posted by Sonal Sharma in a new topic:

Yes all those computers are having ftp access.Do I need to configure my webserver for accesing data on those machines for reading files on those machines or IP addresses.How to do it?
Give some example.Like my web application is deployed on the webserver using JSF on Netbeans with Visual Web Pack.How to access the files in the specified directories on those machines simultaneously like my web application should be able to fetch data from the files on those machines after every 2 secs and upload that data to the database.
 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whether I should use ftp or rmi ?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RMI won't help with this.

You don't need to configure the web server, you just need to write the code that accesses those 6 machines via FTP. Thanks to the Apache Commons Net library, that's pretty easy. The javadocs of the org.apache.commons.net.ftp.FTPClient class show the basics of an FTP client.

Mind you, that's assuming that those 6 machines each have an FTP SERVER running; just having FTP CLIENTS on them won't help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic