Connecting out to the Internet using Sockets

Hi,
My project is an Internet Connection Sharing project where a no of clients try to access the Internet through a single connection (d main server). I've got a basic Java Browser that simply sends on the URL address ("www.java.sun.com") typed into a textfield by the user to a Server when a button is clicked. This is done thru basic read & write methods using an ObjectInput & ObjectOutputStreams. I've also created a socket connection out to the Internet by passing in the URL on port 80, thus establishing a connection... here's the code:
inet_SockCon = new Socket( InetAddress.getByName( str_Buffer ), 80 );
System.out.println( "Connected to: " +
inet_SockCon.getInetAddress().getHostName() );
The next step is trying to get the URL page requested back to the server and from there to the client browser where it will be displayed. I'm using a JEditorPane() on my Browser which formats the HTML data. If anyone has any ideas as to how i can do this it would be gratefully appreciated.
Thank you.

Use a HttpURLConnection.

Similar Messages

  • Connect device to the internet using PC

    i understand that PC suit allow to  "Connect your PC to the web using your device", but i would like to use it the other way, coz connecting to the web from device is expensive. i just wanna update weather services and some podcast regularly to device using PC internet connection. i'm using nokia 6210.
    thanks.
    zenith.

    The phone isn't designed for this at all. It is designed to be used as something to enable a connection, not as something to use an existing connection.
    I'm relatively sure it can't be done via the USB cable. If you google for a piece of software called GNUBox you might be able to get it working over a bluetooth connection. This, of course, assumes you have a bluetooth adapter in your computer (either built-in or in the form of a USB dongle).
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • Windows 8.1 laptop cannot connect to the internet using USB Mobile Broadband stick.

    I bought a new laptop and it came with Windows 8.1 installed. Well, things worked perfectly until I wanted to connect to the internet using my mobile broadband USB stick. I installed the software that came with the stick, and my laptop recognize
    the stick but I still cant connect to the internet. The stick workes perfect in my Windows 7 and Windows 8 laptops, but IT DONT CONNECT WITH MY WINDOWS 8.1 LAPTOP. What can I do to troubleshoot this???
    HOPE I AM SPECIFIC ENOUGH THOU...

    The PC Repair Guy,
    If you haven't already, verify that you can connect to the internet through some other means such as Wi-Fi or Ethernet with your laptop to rule out any network setting issues.  If you are able to connect successfully to the internet, use that opportunity
    to make sure you have
    Windows 8.1 Update installed as well as any other applicable updates your laptop may require.
    You may also want to check the
    Windows Compatibility Center to make sure that your device is compatible with Windows 8.1. 
    Another possibility is that the driver your laptop is installing for the device isn't the correct one.  Check the device manufacturer's site for the most up to date driver they have available for Windows 8.1.
    Hope this helps!
    Mike
    Windows Outreach Team – IT Pro

  • How to connect to the internet using ethernet

    I have an iMac 10,1 and am unable to connect it to the internet using an ethernet cable.
    I have a more recent Mac Book and I just plugged in the ethernet cable to it, clicked the setting in Network settings, and I was connected.
    On the iMac it keeps saying, diagnostics can't fix it etc..?
    On the left panel in Diagnostics, Ethernet has a green light, Network Settings an orange light, and ISP a green light (internet and Server are Red).
    I'm using Comcast cable, and they just say the settings should appear automatically on a Mac (which they apparently did on my Mac Book!)
    Any suggestions, appreciated.
    Alan.

    From the menu bar, select 
               ▹ System Preferences... ▹ Network ▹ Advanced ▹ TCP/IP
    What values are shown for the following?
              Configure IPv4
              IPv4 Address
              Subnet Mask
              Router

  • My macbook seems to be very slow in connectivity to the internet using our airport extreme while others can just go buzzing along surfing the net and/or downloading items. What gives with mine?

    i don't understand why my Macbook seems to balk or go incredibly slow when I'm trying to connect or surf the internet at home. When I'm at work ( I use a company owned laptop and have used one of their laptops for several years, this one noe for about three years but have just started having this problem in the last 6 - 8 months) it works fine but at home slow, slow, slow!!! at home it takes about 3-5  minutes for any page to load in and if there are a lot of images or videos to load, well take a coffee break while it loads in when you come back the page might, might be loaded. I'm using my partners ibook G4 right now and connectivity is great no problem but mine had yet to even load in the apple homepage yet and I had to go get this one, turn it on, open up a browser, log in, type my question out and yet over on my laptop, it's still trying to load.Can anyone give me a clue as to what's going on?

    i don't understand why my Macbook seems to balk or go incredibly slow when I'm trying to connect or surf the internet at home. When I'm at work ( I use a company owned laptop and have used one of their laptops for several years, this one noe for about three years but have just started having this problem in the last 6 - 8 months) it works fine but at home slow, slow, slow!!! at home it takes about 3-5  minutes for any page to load in and if there are a lot of images or videos to load, well take a coffee break while it loads in when you come back the page might, might be loaded. I'm using my partners ibook G4 right now and connectivity is great no problem but mine had yet to even load in the apple homepage yet and I had to go get this one, turn it on, open up a browser, log in, type my question out and yet over on my laptop, it's still trying to load.Can anyone give me a clue as to what's going on?

  • I just downloaded the latest OS upgrade and since I can not connect to the internet using my cellular data plan.

    I just downloaded the latest iOS.7 upgrade on my ipad2, and since I can not connect to the internet using my cellular data plan.  I have checked my data plan and it's both current and over 2GB remaining.  However the indicator shows no service, thus would be the best steps to recover.  Thanks much for any support that can be provided.

    Hello Kmart2@3
    Check out the troubleshooting article below to get cellular to start working again. 
    iPad (Wi-Fi + Cellular Models): Troubleshooting a cellular data connection
    http://support.apple.com/kb/TS4249
    Regards,
    -Norm G.

  • How do i use my iMac and the macs wired internet connection to share the internet with my iPod and iPhone

    How do i use my iMac and the macs wired internet connection to share the internet with my iPod and iPhone. For 6months I had set up a network that shared the internet through bluetooth to my iPod 5th gen but i messed it up when i tried to add my iPhone 5s and i can't remember how to do it.

    The following has instructions: OS X Mavericks: Share your Internet connection

  • My Macbook Pro cannot connect to the internet using an ethernet cord.

    My Macbook Pro cannot connect to the internet using an ethernet cord. It was working fine for weeks, then all of a sudden just stopped. What could the problem be?

    Hi bean07670,
    If you are having an issue with the Ethernet connection on your MacBook Pro, you may find the following article helpful:
    Mac OS X: Troubleshooting a cable modem, DSL, or LAN Internet connection
    http://support.apple.com/kb/TS1317
    Regards,
    - Brenden

  • I have a desktop computer with xp Pro windows. I updated from Firefox 3.6 to 4.0 and found I could not connect to the internet using this updated bowser. I had to remove 4.0 and reinstall 3.6 to restore a working version of Mozilla. Why did this occur?

    I tried to update my browser from 3.6 to4.0. On restarting the computer I found I could no longer connect to the internet. I then connected to the internet using Internet Explorer and removed the mozilla browser and reinstall Mozilla firefox 4.0. Again the browser using this updated version didn't work. So reinstalled Mozilla firefox 3.6 and it worked.
    It appearsMozilla firefox 4.0 has a problem.
    My operating system is Windows XP pro.

    Uninstall 2.x totally
    Use CCleaner Registry tool
    Do whatever you need to to nuke the existing Apple programs and folders hidden here and there also.
    BC 2.2 was XP and Vista only

  • I am trying to connect my server using an Ethernet to router and want to search the internet using another wifi router. How can I accomplish this?

    I have a small storage server and want to connect to it via Ethernet.  I also want to connect the internet using a separate Wifi router from my provider.  How can I do both?

    Set the service order to have wifi first.
    System Preferences > Network > Click on the gear > Set Service order

  • Could my ipad2 connects to the Internet using SIM card or USB Modem?

    Could my ipad2 connects to the Internet using SIM card or USB Modem?

    If you have a 3G iPad, it can connect to the internet using cellular data. As the iPad has no USB port, you can't connect a USB modem. You can use what is called a MiFi, though. They connect to cellular service and create a personal WiFi hotspot.

  • Anyone have issues with their ipad staying connected to the Internet using an arris-5e12 router? I seem to be getting kicked off the Internet frequently

    Anyone having trouble staying connected to the Internet using an Arris 5e12 router.?

    Are you in an area where it doesn't pick much wifi signal up. If yes try to move your device nearer to the wifi connection box

  • Since downloading osx v10.7lion every time i try to connect to the internet using BT Broadband i keep getting a message saying " you cant openthe application ) because Power PC applications are no longer supported." this is very annoying as i likeBT ?????

    Since downloading osx v10.7lion every time i try to connect to the internet using BT Broadband i keep getting a message saying
    " you cant openthe application ) because Power PC applications are no longer supported." this is very annoying as i likeBT and the way it opens with all the local up to date news plus other apps +++ 
    Please can anyone help me as apple will not help unless i sign up for a new product agreement which i cannot understand as every thing worked before this so called very latest software that everyone cant do without  ?????

    I had the same problem with some apps and printer setup software. SInce Rosetta has been discontinued on Lion my only solution was to restore to 10.6 since the manufacturers either have not yet or will not release updated apps. In this case you have to determine how important those old PPC apps are to keep around and if there alternitives that are available to replace the functionality. I would expect a broadband provider to update thier apps if it is something that is required to connect.
    Mike

  • Why can't i connect to the internet using airport

    I can't connect to the internet using Airport. I have to use a ethernet connection.

    go to applications>utilities, and make sure your wireless is showing up in the left colum. If you see it there follow the promps to set it up

  • After a recent comcast / xfinity update I have been unable to even connect to the internet using firefox. I can using internet explorer.

    After a recent comcast / xfinity update I have been unable to even connect to the internet using firefox. I can using internet explorer.

    Take each of the following steps that you haven't already tried, until the problem is resolved.
    Step 1
    Restart the router. Many problems are solved that way.
    Step 2
    Change the name of the wireless network, if applicable, to eliminate any characters other than letters and digits. You do that on your router via its web page, if it's not an Apple device, or via AirPort Utility, if it is an Apple device.
    Step 3
    Run the Network Diagnostics assistant.
    Step 4
    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Enter the name of your wireless network in the search box. You should have one or more "AirPort network password" items with that name. Make a note of the name and password, then delete all the items. Quit Keychain Access. Turn Wi-Fi off and then back on. Reconnect to the network.
    Step 5
    You may need to change other settings on the router. See the guidelines linked below:
    Recommended settings for Wi-Fi routers and access points
    Potential sources of interference
    Step 6
    Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.
    Step 7
    Reset the System Management Controller (SMC).

Maybe you are looking for

  • New Infinity order advice

    Hi, We've recently placed a new order for Infinity and received the following email: Regarding the order for Fibre service VOLxxxxxxx. We are contacting you to advise that the order has gone for a Survey. Since the external work is scheduled for 09/1

  • Itunes & connection icon on screen

    I have the itues icon and the connection cable showing on my screen.  I looked up a solution and it was suggested I log onto my apple account.  I've done that, now what?

  • Can I download onto a usb flash drive instead of a IPod

    Can I download onto a usb flash drive instead of a ipod?

  • SO Pricing User Exit - How to know which item is selected for re-pricing.

    Hello Experts, I have to modify material data when user does a update pricing in VA02, the problem is...How do I know which item is selected for re-pricing (in MV45AFZZ)? I am using user exit USEREXIT_PRICING_PREPARE_TKOMP. For Ex: If my order has 3

  • Revenue dummy cost centre

    Hi experts, I am doing a rollout for another company.  The config are copied from another copy and should be the exact.  However, I face a problem with Billing and it always look for revenue dummy cost centre.  I can't find any config in OKB9 Default