Get the response instead of loading it in the browser

HI.
I would like to make a little program that would read the response of a request to a web page. I'm cant find how to do it. Everything i can foud call's the URL but loads th result in the initial browser window.
Heres what I want :
1- A friend as a servlet on a web site that does some maths with initial numbers intered in the window.
2- I would like to make another servlet that would send some numbers to my friends servlet on the url(GET method).
3- The all purpose is to be able to send a series of request on is servlet from a little list of numbers.
I would appreciate any inputs. I've looked thru the javax.servlet.http librairis and java.net.
Thanks for helping me.

You don't need a servlet, an ordinary jaav program can do this. Have a look at the java.net package in the JDK docs. Something (totally untested!) like this should work;
URL url = new URL("http://www.friendssite.com/friendsServlet?par1=val1&par2=val2&par3=val3");
//par and val are as required by your friends serlet
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
con.setRequestMethod("GET");
conn.connect();
InputStream in = conn.getInputStream();
//Now you can read the results from the InputStream
HH

Similar Messages

  • When I use my Apple ID for the last 12 hours I get this response:  "There was an error in the App Store. Please try again later. (4)".   How do I get around this?  Try two apple ID's.  Same thing.

    When I use my Apple ID for the last 12 hours I get this response:  "There was an error in the App Store. Please try again later. (4)".   How do I get around this?  Try two apple ID's.  Same thing. 

    What does it mean when I get...: Apple Support Communities
    'there was an error in the App Store....: Apple Support Communities

  • HT4943 i used I-Books to download a book.  Now I get a message "failure to load book because the requested resource is  "

    I used i-Books to buy a books.  These last two days when I try to access the book I get this message:"Failed to load book because the requested resource is missing."  What the **** does that mean?  I paid $10 for the darned book.

    Hi vbCoach1!
    If these items were purchased from the iTunes Store, then you can find an article about re-downloading past purchases right here:
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/HT2519
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • TS1702 Previously purchased book on iBooks, previously read. Still visible on iBooks on the iPad. When I attempt to open the book now, I get the message: "Failed to load book because the requested resource is missing." Help.   Larry

    On iBooks app on iPad: When trying to open a previously purchased and read book, I get the message "Failed to load book because the requested resource is missing."    How can I open the book again?      Larry107

    Quit the iBooks app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logou appears and let go of the button.
    Or try deleting the book and download it again. You can download it again for free as long as you use the same Apple ID.
    If that doesn't work either, sometimes deleting the iBooks app and reinstalling it may work. But art with the first two suggestions.

  • When I try to open aperture (which has been working fine for months), I get this response: There was an error opening the database for the library "~/Pictures/Aperture Library.aplibrary". Please help!!

    When I try to open aperture (which has worked great for months), I get this response:
    There was an error opening the database for the library “~/Pictures/Aperture Library.aplibrary”.
    Please help!! Thank you!! =)

    Sonny3300, your signature says "Aperture 2" - is that correct? Then you need this trouble shooting guide:
    Aperture 2: Troubleshooting Basics: http://support.apple.com/kb/HT2945
    What is your Operating system version and where is your library located? Have imported new images recently or changed the location of your library?
    Regards
    Léonie

  • If the data network is not available for some time, to get it again we need to restart the phone instead it is not finding the data network instantly. why cant the iphone searches data net work offten if not available. i am totally disappointed with this!

    If the data network is not available for some time, to get it again we need to restart the phone instead it is not finding the data network instantly. why cant the iphone searches data net work offten if not available. i am totally disappointed with this!

    Still it could not find the data network.it searches for voice network instantly and works too. but even full voice network available, there is no data network.when i restart the phone it could find data network.
    Already i reset network settings for two times.

  • My photos won't "load" - it has worked fine for at least two years, but suddenly now when I plug in the chip, iPhoto opens up as usual, but the window just says "loading photos",  and the little wheel keeps on spinning - can anyone help me?? I am new here

    my photos won't "load" - it has worked fine for at least two years, but suddenly now when I plug in the chip, iPhoto opens up as usual, but the window just says "loading photos",  and the little wheel keeps on spinning - can anyone help me?? I am new here. I need to get it working again because we're about to go on a trip!

    What version of iPhoto? Assuming 09 or later:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • I'm using firefox version 6 and for the last three days the add-ons manager page won't load. my question is why won't the add-ons page load? is the server down on your end?

    i'm using firefox version 6 and for the last three days the add-ons manager page won't load. my question is why won't the add-ons page load? is the server down on your end?

    Click on something below the Get Add-ons menu item on the left side of the Add-ons Manager tab.

  • I am going to sell my second generation ipod touch, so i resetted it to factory defaults. It said it would take up to an hour, and i patiently waited. But when the black and white loading bar completed, the ipod went to the black screen with an apple logo

    I am going to sell my second generation ipod touch, so i resetted it to factory defaults. It said it would take up to an hour, and i patiently waited. But when the black and white loading bar completed, the ipod went to the black screen with an apple logo on it. Sounds about right, right? But now, there is a processing circle on top of the logo, but the circle spins once, and stops at about halfway to the bottom. It just stays there, and about every half to one hour it becomes a white screen and starts all over again. (not the loading bar part, just the circle). I've tried holding the power and the home button, and it works, but it just goes back to the circle screen with the apple logo. HELP PLEASE?

    Try:
    - iOS: Not responding or does not turn on
    - If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • I have totally "uninstalled" what I had and then reinstalled the newest  version of itunes.  Still......  First, when I click on the itunes icon to load it takes the program anywhere  from two to three minutes to load.  None of my other programs take this

    I have totally "uninstalled" what I had and then reinstalled the newest
    version of itunes.  Still......
    First, when I click on the itunes icon to load it takes the program anywhere
    from two to three minutes to load.  None of my other programs take this
    long.
    When in the itunes program I can be moving around in my library and itunes
    when choosing a song or songs, choosing file, edit, etc,. whatever command I
    choose it just suddenly stops.  I can issue five commands and watch each one
    respond in 30 second to two minute intervals.  I can issue several commands,
    even shutting down, and it will do all but takes several minutes to do so.
    My itunes program was working fine when this problem suddenly arose.
    Terry

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99436)

  • How do I get Firefox to open when I dial up to connect to the internet, instead of internet explorer for the internet service provider?

    I have a dial up connection for the internet through Netzero.com, and when I click on it to dial up to the internet, it brings up the Netzero home page on Internet Explorer. I've changed my default home page from Internet Explorer, to Firefox, but when the internet is connected, Internet Explorer is the one that brings up the Netzero home page, not Firefox, so I have to click on the icon for Firefox, and then it opens, with Netzero home page on it, so I have to go through 2 different processes to get to use Firefox. I downloaded Firefox because it's suppose to be faster that Internet Explorer, especially since Internet Explorer keeps not responding when I'm in the middle of doing something. So I thought I'd try Firefox, but it doesn't seem to be faster than Internet Explorer, since the ISP that I have has a web accelerator, but it doesn't work on Firefox for some reason, I can see on a meter on my desktop when it's accelerating, and Firefox doesn't accelerate ever, if I change over to Internet Explorer, I can see the meter accelerating the web page. Hope you can help me with this problem, as I like Firefox. Thank you very much.

    Try changing firefox to the default browser: [http://kb.mozillazine.org/Setting_Your_Default_Browser]. That will probably get firefox to open when you dial up.
    I'm not sure what you mean by "the meter accelerating the web page". Can you explain that?
    Thank you

  • Everytime I click on a link, instead of loading it on the same page it opens a new tab.

    Suddenly every time I click on a link, it opens it in a new tab i.e.; if I search yahoo from my home page, it opens yahoo in a new tab, then when I click on yahoo mail, it opens yahoo mail in a new tab, and then when I sign in, it opens yet another new tab, etc etc. I must have pressed something, but I don't know how to undo it.

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • How to contain a sub-component in the module instead of containing it in the main application

    Hi,
    I've 3 files
    Appln.mxml (application file)  ----  contains main application
    component.mxml (component file)  ----  contains component
    module.mxml (module file)  -----  contains module
    Generally the 'component.mxml' file will get loaded into the 'Appln.mxml' file (i.e., 'Appln.mxml' file will contain the custom component files) and whereas module file will get loaded on-demand.
    So Now instead of containing the data of 'component.mxml' file in the 'Appln.mxml',  I want to contain 'component.mxml' file data in the 'module.mxml' file itself and load the 'component.mxml' when module is loaded on-demand but not when application is loaded. So can any one please suggest me how to do it?
    Thanks in advance..

    Theo--
    You can delete software components & versions from the IR in XI 2.0.  (We're on Service Pack 5, and I've done it to clean up our IR.)
    Here is the process:
    1. Delete all configuration and/or import objects from the SCV.  Don't forget the 2 fault data types that SAP automatically creates in every namespace.
    1a.  Activate all change lists?  I don't remember for certain if this is needed here; if it won't let you save the deleted namespaces in step 2, then do this first.
    2. Double-click on the Software Component Version so that it comes up in the right pane.  Click on the change/edit button.  Delete all the namespaces from the SCV.  Save.
    3. Activate all change lists.  (It won't let you delete the SCV if you have uncommitted changes.)
    4. Open the SCV again (if it's not still open).  On the menu at the top of the right pane, go to Software Component Version...Delete.  You may or may not have to activate changes again.
    If I remember right, the software component will disappear automatically with the deletion of the last version.
    Hope this helps!
    --Dan King
    Capgemini

  • Internet is connected and majority of the websites work, yet sometimes the pictures are not loading? And the suddenly the hole page won't load? The weirdest thing is I go venture off to another website and it'll work just fine??

    So I have been having this very annoying problem with the loading of certain internet sites e.g - Ebay, google maps, google in general & you tube.
    My internet connection is fine and i have spoken with my service provider TPG and Apple about this annoying issue.
    I can be generally browsing on google for instance and then suddenly the page freezes? No matter how many times i click the Refresh tab it still manages to do the same thing. Now the most confusing bit is, instead of clicking the refresh button I then venture off to Yahoo for instance and that website will work just fine??
    Ugh, another (now) consistant issue is that none of my pictures are loading when im on Ebay? yet i can browse every catagory just fine....?
    Please, if there is anyone out there HELP ME.... I'm a Mechanical Technician (Fitter by Trade) I do not class myself as a Computer Technician.... Far from it!!

    Thanks for the advise....
    You're correct about the steps you mentioned earlier.  Tho Unfortunetely I've tried these things. Infact I was on the phone with applecare last night for about an hr & a half, yet even they seem stunned as to what is causing this?
    We reset the safari in a different way as you mentioned earlier (I would not have been able to do this without some Technical assistance)
    Open Finder >  click on the GO tab > Hold down the OPT key & a tab will appear that reads [Libary]
    Click on Libary > Now look for a folder that reads [Safari]
    Drag this folder to the desktop
    Now open the folder that reads [Preferances]
    Look for files: com.apple.safari.plist & com.apple.Safari.RSS.plist
    Now quit any programs operating & restart the computer.
    Vwallaa Safari is officailly reset, it will even take you on a tour when you open it for the first time.
    Now the catch is.... this didnt work "For me"  So My next step was to make a dummy account on my Mac (making sure that it had administrator rights) I then tried it on the dummy account. Luck would have it as it still managed to do the same thing.
    Apple came to the conclusion that restoring Lion might be a possible solution. So we done just that, wasnt till this morning when i turned on this annoying Mac i realised that it is still doing the same thing.
    Apple care is going to call me this afternoon so hopefully "fingers crossed" this issue can be fixed.

  • Is JSF 1.2 buffering the response, or streaming it back to the browser?

    Hi,
    I recently implemented a simple custom component which "streams" back a file to the browser (doing some processing on it).
    Using myfaces i get out of memory errors when processing large files, I later learned that the myfaces implementation actually buffers the response data before sending it back to the browser, which causes problems for me.
    I would be grateful for some insight in how this works in JSF 1.2 RI.
    Regards,
    Mikael

    Basically content interweaving is handling of JSF and non-JSF output in a way so that it appears in the rendered response the way it appears in the page.
    Does in mean that the response is processed further to check if there are any expressions which needs evaluating?No we don't handle the expressions, just the insertion of content before and after the view, and the writing of state information.

Maybe you are looking for