Re: GET request in JAVA/JSP

Discussion in 'Java' started by Manish Jethani, Jul 29, 2003.

  1. tester wrote:

    > Hello! My question is that I have a task that I need to get a file
    > through a URL. The general URL looks like this:
    > https://<<URL>>?PARAMETER1=VALUE1&PARAMETER2=VALUE2
    >
    > Previously we could manually type this URL in browser and save the file
    > in local HD. Now we would like to run a program or script to get the
    > file automatically. Do you think in what way I can do this? I prefer to
    > using JAVA or JSP to do this. In Coldfusion, there seems to be a tag
    > named CFHTTP or CFHTTPPARAM to do the similar job; but in JAVA/JSP I
    > have no idea. Do you have any suggestion?


    You want to save a www resource on your hard disk, using a
    script written in Java. Write a program to fetch the resource
    and save it on disk. You have to use the HttpURLConnection
    class, amongst other things.

    On the other hand, why don't you use a simple program like wget?

    Manish

    --
    Manish Jethani (manish.j at gmx.net)
    phone (work) +91-80-51073488
     
    Manish Jethani, Jul 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,073
    John Saunders
    Oct 16, 2003
  2. Joerg Gippert

    Re: GET request in JAVA/JSP

    Joerg Gippert, Jul 29, 2003, in forum: Java
    Replies:
    0
    Views:
    483
    Joerg Gippert
    Jul 29, 2003
  3. Kai Grossjohann
    Replies:
    2
    Views:
    806
    Anton Spaans
    Dec 8, 2003
  4. DigitalUncle
    Replies:
    0
    Views:
    925
    DigitalUncle
    Nov 2, 2004
  5. Replies:
    0
    Views:
    4,419
Loading...

Share This Page