How can i get the HTTP header info using Java

Hi,
I kinda need to extract the HTTP header info from a page that i goto through a URL objecrt and socket. Java.
Can someone please help me.. thanks!!!!
System.out.println("Enter URL : ");
String getAdd; // The URL that the crawler begins at.
// Manually take in URL
Scanner sc = new Scanner(System.in);
getAdd = sc.nextLine();
URL myURLobj = new URL(getAdd);
String hostName = myURLobj.getHost();
          Socket s = new Socket(hostName, 80);

URL url = new URL(getAdd);HttpURLConnection conn = (HttpURLConnection)url.openConnection();
Map<String, List<String>> headerFields = conn.getHeaderFields();

Similar Messages

  • How can I get the App store to use money in my account rather than a credit card when I want to buy something?

    How can I get the App store to use money in my account rather than a credit card when I want to buy something?

    The iTunes/Mac App Stores use credit on an account first. You are asked to supply an additional payment method when the cash credit doesn't cover the complete cost of the purchase.

  • How can we get requester's user id using java code

    Hi,
    How can we get requester's user id using java code?
    eg: If i had logged in as xelsysadm and request a resource for user uid101 on the userid field it should display uid101 and not xelsysadm.
    also,
    I have a resoure "A" which on revoking should also revoke resources B and C. How can it be done. Resource A, B, and C are 3 different resource objects.
    ==Thanks,
    doki

    Ok, so there is a way, but it's not available during submission. You can use the findRequests api. From the result set, get the "Requests.Consolidated Data Value" value. In this information, you will get an xml formatted data. It provides the list of users on the request on the left side after submission. After the request is completed, this value is available. Upon completion, you could get the request information, get this value, and parse the information for user ids.
    In the same adapter, use the following API:
    formIntf.setObjectFormData(objInstanceKey, formHash)
    The formHash is a hashtable containing the field name on your object form, and the values you wish to populate it with. You could create a textarea box on your object form and populate the userids for who the request is for.
    However, this makes absolutely 0 sense. When you get a request, the list of userids are listed right there on the request.
    -Kevin

  • HT1918 how  can i get the user manual  info back  which has  been  erased  from my  settings  icon  pafe  after  a restore from itunes

    how  can i   get  my user  manual info  back onto  my  settings   menu 
    this  heading  did  not  appear  on the settings  menu following  a  restore  necessitated  bt  a  freezing screen  glitch  thanks

    I'm not entirely sure what you are referring to, there isn't a user manual section in the iPad's Settings app. If you want an iPad then you can either download it from here : http://support.apple.com/manuals/ipad/
    Or if you download the iBooks app then there should be a copy in the ibookstore in it

  • Can't get the current bitrate info use SMPTE-TT Plugin

    Using OSMF2.0 to stream a smil title.
    Add the MediaPlayerCapabilityChangeEvent.IS_DYNAMIC_STREAM_CHANGE event listener, after the event dispatch then add the DynamicStreamEvent.SWITCHING_CHANGE event listener.
    The bitrate info can be report, normal. But after I add the SMPTE-TT plugin and load it like this:
    var pluginResource:MediaResourceBase = new PluginInfoResource(new SMPTETTPluginInfo);mediaFactory.loadPlugin(pluginResource);
    The title can be stream correct and the quality of the video can be set by the bandwidth, but only the DynamicStreamEvent.SWITCHING_CHANGE event can not be dispatch, so I can't get the current bitrate info.
    I debug it in the OSMF source code and find the issue in the org.osmf.elements.compositeClasses.ParallelDynamicStreamTrait class line 323
    FYI:
    onSwitchingChange function that the numChildrenSwitching property always 0, so it can not call the setSwitching function and can not dispatch DynamicStreamEvent.SWITCHING_CHANGE event.
    So, I add some changes from line 333 to line 336 and it has be fix:
    Environment:Flex SDK 4.6 + flash player 11.8.
    I don't know it is a bug in the OSMF framework and I want to get more info about it.
    Thanks.

    can you turn off the message pane (F8) between restarts? I am guessing it will turn on again as well.

  • How can I get the memory allocation info of a java thread?

    Now I am going to write a program to monitor the execution condition of the java threads. But it seems that the classes in standard edition of JDK does not provide facilities to get the information such as the memory allocation and CPU time of a running thread. How can I do with it? Can I use JNI or JVMDI to get them? If it could do, how?

    Thanks a lot. I just browsed the specification of jvmpi. It is interesting and it seems that I can get the information I need. However, if I want to get the information in my program, I mean, if I want to build a class which may use JNI method to invoke the function written with JVMPI, and then forward the data to other upper layer objects, can it be done?

  • How can i get the time capsule to use my mac's mac address

    on some wireless routers you can get the router to use the mac address of a client connected to it instead of it's own.
    Can i do that on the time capsule?

    Sorry, but no. You cannot change (spoof) the MAC address on any of the AirPort/Time Capsule routers.

  • How Can I Get The Table_Name Where I Used Dbms_Errlog?

    CREATE TABLE ERROR_LOG
    ORA_ERR_NUMBER$      NUMBER,
    ORA_ERR_MESG$           VARCHAR2(2000 CHAR),
    ORA_ERR_ROWID$      UROWID(4000),
    ORA_ERR_OPTYP$      VARCHAR2(2 CHAR),
    ORA_ERR_TAG$           VARCHAR2(2000 CHAR),
    ORA_ERR_TABLE_NAME      VARCHAR2(30),
    ORA_ERR_TIME           DATE     DEFAULT SYSDATE,
    ORA_ERR_AUTHOR     VARCHAR2(30)     DEFAULT USER     
    I create a single table for handling errors for all tables.
    I just want to Get the table name where I used dbms_errlog.
    I want to get table_name where I performed last DML Statemet?
    Edited by: Nilesh Hole on May 24, 2010 4:50 AM
    Edited by: Nilesh Hole on May 24, 2010 4:57 AM
    Edited by: Nilesh Hole on May 26, 2010 3:43 AM

    I should have written "you should not" rather than "can not." The advice holds.
    The point of using the package in its default mode is that you can fix the problems.
    Do it generically and all you learn is that an error occurred.
    SQL> select * from ERROR_LOG_SERVERS;
    ORA_ERR_NUMBER$ ORA_ERR_MESG$                                      ORA_ERR_ROWID$     OR ORA_ERR_TA
                  1 ORA-00001: unique constraint (UWCLASS.PK_SERVERS)                     I
                    violatednot much useful information.
    But I appreciate you posting the idea so I show on my website why doing this is a bad idea.

  • HT5622 I have changed my appleID and password through my laptop.  I have then changed it on my iPod Touch in settings. When I try to update my apps on the ipod touch it keeps throwing up the old appleID.  How can I get the iPod Touch to use the new ID?

    I have changed my appleID and password through my laptop. I have then changed them in my iPod touch settings in "iTunes & App stores" When I try to update my apps it fails because it wishes to continue to use the previous ID.  What do I have to do to make it accept the new ID?

    Also
    If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.

  • HT1296 I am trying to sync contacts from my iPhone to Mac.  When I plug in my iPhone, I do not get the Info tab in iTunes (as mentioned in how to sync on this website).  How can I get the info tab to appear?

    I am trying to sync contacts from my iPhone to Mac.  When I plug in my iPhone, I do not get the Info tab in iTunes (as mentioned in how to sync on this website).  How can I get the info tab to appear?

    Since the release of Mavericks (OS X 10.9) syncing contacts and calendars with a Mac via iTunes is no longer supported. The currently supported method is via iCloud. Setup instructions: http://www.apple.com/icloud/setup/

  • I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date is created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date  created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
    Regards
    TD

  • My computer crashed and I no longer have the itunes library. i get an error msg that my iphone is synced to another library - how can I get the info from the phone to the itunes library?

    my computer crashed and I no longer have the itunes library. i get an error msg that my iphone 3g is synced to another library - how can I get the info from the phone to the itunes library without losing everything? How do I delete old audiobooks from my iphone?

    You can transfer itunes purchases:  File>Devices>Transfer Purchases
    The iphone is not a storage/backup device.  The sync is one way - computer to iphone.  The exception is itunes purchases.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.

  • Found an locked iphone5c, how can i get the owners info, email or anything if he/she only says "pls. bring back my phone.. godbless" on the activation menu??

    found an locked iphone5c, how can i get the owners info, email or anything if he/she only says "pls. bring back my phone.. godbless" on the activation menu??

    Try using Siri and ask "Who's phone is this?" It should give you the name, number, and email address of the owner. Also, you can try swiping to unlock, select Emergency, then see if they have a Medical ID set up. If they do, they may have the name of a contact with a phone number listed.

  • How can i get the info off of an old appleworks database. to my mountain lion. OS X?

    how can i get the info off of an old appleworks database. to my new mountain lion. OS X? My old data base is on AppleWorks 6

    1.  Read Roger Wilmut's excellent series of articles Abandoning Appleworks, especially the one on databases.
    2.  Call the Apple Store and order Snow Leopard Server for $19.99 + sales tax & shipping: 1.800.MYAPPLE (1.800.692.7753) - Apple Part Number: MC588Z/A (telephone orders only).
    3.  Install Snow Leopard Server into Parallels 8, now available for a short time (4 more days) in the March 2013 MacUpdate 10 App Bundle for $49.99:
    4. Install Appleworks 6.2.9 into Snow Leopard Server and it will now run concurrently with Mt. Lion:
                                  [click on image to enlarge]

  • How can I get the name of weblogic.Server

    Hi all,
    in my EJBs I want to know, on which server instance I´m running. I need this for
    logging info. How can I get the servers name?
    When I load the JNDI tree and select java:comp, an error occurs and a lot of information
    is printed. One is weblogic.Server and that is what I´m searching for.
    I use WLS 6.1 SP1
    Any ideas? Thanks,
    Nicole

    Use JMX. See http://dima.dhs.org.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Nicole" <[email protected]> wrote in message
    news:3c4d6daa$[email protected]..
    >
    Hi all,
    in my EJBs I want to know, on which server instance I´m running. I needthis for
    logging info. How can I get the servers name?
    When I load the JNDI tree and select java:comp, an error occurs and a lotof information
    is printed. One is weblogic.Server and that is what I´m searching for.
    I use WLS 6.1 SP1
    Any ideas? Thanks,
    Nicole

Maybe you are looking for

  • Can't print from macbook pro to hp deskjet 3054

    I have tried what hp says to do on there website to get my printer to print but it is not working. It worked once and I went to print again and nothing happened. So i have no idea what to do. Should I go out and buy a new printer. Please help.

  • JMS config not working with OSB

    I have been trying the JMS through out the day and I believe that this is currently becoming a show-stopper.This is because, the jms configuration is not properly done. In case you happen to find time, please ask this question to Oracle: Steps: 1. Cr

  • Ovi email error. DESPERATE!

    Hi guys,   I'm Aaron and I'm having a very annoying problem with  my email. For some strange reason I can log on to my account however I cannot seem to view my email. The loading symbol just keeps going on and on, this applies for my inbox and all my

  • Why apple has not fixed or atleast responded to users on LION Overheating issue???

    I am having a MacBook Pro 13 bought last year. I was happy with my snowleopard but, my friend sugested to upgrade to LION, paid all money and upgraded to LION, Within a week overheating started, and it was difficult to keep it on my lap. I have tried

  • Update a file from WSP in several site collection based on my SiteDefinition

    Hi, i have a minimalisitic SiteDefinition with a Stapling Feature. The Stapling Feature includes one site-scoped and another web-scoped feature. Within the Site-Scoped Feature i am deploying tweo pages. <?xml version="1.0" encoding="utf-8"?> <Element