• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

accesing data from an IP address

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
whether I should use ftp or rmi ?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Squanch that. And squanch this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic