Reading Data from a Web page


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Reading Data from a Web page

  1. #1
    Jawahar Rajan Guest

    Reading Data from a Web page

    Hi all,
    I am trying to read data directly from a web page using java. The Client

    will not give access to their data base but will post data on their web
    page. Is there a way for me to be able to use java servlets to read data

    from a web page without connecting to the client database. I know that
    when making a servlet request this is usually to a server, which then
    can connect to a database using JDBC.
    How ever could it be possible to run request on a web page, (seems an
    strange questions!) but if the client will not let us access the data
    from a database then we can only use the web page.

    Any ideas or suggestions are welcome.
    Thanks
    Jawahar




  2. #2
    Rajkamal Gopinath Guest

    Re: Reading Data from a Web page


    Hi


    What do you want to do on the Client Database ?

    Does the service need to update client database, server database or both
    ?

    Generally Client Side Access to Database Can be Implemented by an ActiveX
    Control or an Applet and from there data can be passed on to Servlets or
    Vice Versa

    Regards

    Raj


    Jawahar Rajan <Jawahar.Rajan@rtp.ppdi.com> wrote:
    >Hi all,
    >I am trying to read data directly from a web page using java. The Client
    >
    >will not give access to their data base but will post data on their web
    >page. Is there a way for me to be able to use java servlets to read data
    >
    >from a web page without connecting to the client database. I know that
    >when making a servlet request this is usually to a server, which then
    >can connect to a database using JDBC.
    >How ever could it be possible to run request on a web page, (seems an
    >strange questions!) but if the client will not let us access the data
    >from a database then we can only use the web page.
    >
    >Any ideas or suggestions are welcome.
    >Thanks
    >Jawahar
    >
    >
    >



  3. #3
    Jawahar Rajan Guest

    Re: Reading Data from a Web page

    Raj
    Thanks for your reply
    We are trying to read values (whole sale prices for various commodities)
    directly from a Web page. The Web page is updated by a Consumer group and
    the data is available to the public.
    What we need to do, is get the data from the web page and then use it for our
    process.
    The Consumer group will not give us the data directly or allow us to access
    their Database!
    (Because they prefer to post the data for the public to see). We are not
    allowed to run a request to the Consumer Group database, hence we can only
    use what is displayed on the web page.
    Hence My question, Is it possible to read data from a web page using Servlets
    or an Applet
    The Data is displayed in Columns as text or sometimes in text boxes, at
    present we have our data entry operator to manually read the values and then
    use them in our process. We are looking for a way to automatically read the
    values (Essentially Scan the web page!)

    Thanks Again
    Jawahar



    Rajkamal Gopinath wrote:

    > Hi
    >
    > What do you want to do on the Client Database ?
    >
    > Does the service need to update client database, server database or both
    > ?
    >
    > Generally Client Side Access to Database Can be Implemented by an ActiveX
    > Control or an Applet and from there data can be passed on to Servlets or
    > Vice Versa
    >
    > Regards
    >
    > Raj
    >
    > Jawahar Rajan <Jawahar.Rajan@rtp.ppdi.com> wrote:
    > >Hi all,
    > >I am trying to read data directly from a web page using java. The Client
    > >
    > >will not give access to their data base but will post data on their web
    > >page. Is there a way for me to be able to use java servlets to read data
    > >
    > >from a web page without connecting to the client database. I know that
    > >when making a servlet request this is usually to a server, which then
    > >can connect to a database using JDBC.
    > >How ever could it be possible to run request on a web page, (seems an
    > >strange questions!) but if the client will not let us access the data
    > >from a database then we can only use the web page.
    > >
    > >Any ideas or suggestions are welcome.
    > >Thanks
    > >Jawahar
    > >
    > >
    > >



  4. #4
    Paul Clapham Guest

    Re: Reading Data from a Web page

    Use something like this, using classes from the java.net package:

    URL = new URL("http://your.client/theinfo.html");
    URLConnection con = url.openConnection();
    InputStream is = con.getInputStream();

    and read the HTML source for that web page from the InputStream. You'll
    have to write code to parse through that HTML and pick out the data you are
    interested in.

    PC2

    "Jawahar Rajan" <Jawahar.Rajan@rtp.ppdi.com> wrote in message
    news:3B290DEC.9A9EE56C@rtp.ppdi.com...
    > Hi all,
    > I am trying to read data directly from a web page using java. The Client
    >
    > will not give access to their data base but will post data on their web
    > page. Is there a way for me to be able to use java servlets to read data
    >
    > from a web page without connecting to the client database. I know that
    > when making a servlet request this is usually to a server, which then
    > can connect to a database using JDBC.
    > How ever could it be possible to run request on a web page, (seems an
    > strange questions!) but if the client will not let us access the data
    > from a database then we can only use the web page.
    >
    > Any ideas or suggestions are welcome.
    > Thanks
    > Jawahar
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center