How to read the html code from a specific page

is there a way that I can get the source code of a specific url and display that into a textarea with java?

Sure. One thing you could do would be to have a servlet that fetches html from a given url and stores the html in a jsp bean. You can then use the data in this bean to populate the text area.

Similar Messages

  • How to read the HTML code from a webpage

    Hi, I want to be able to read the HTML code of a web page
    In order to extract some info from some pages.
    How can I do that?
    is it using cl_http_client ? I played with that class a bit, but wih no sucess to what I need...

    Hi RagnaRock,
    You can use the following form, hope it helps you.
    Regards,
    Ozcan.
    form get_data_from_url using iv_url type clike changing iv_data type string.
    DATA: HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
      clear  iv_data.
      CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
           EXPORTING
            URL                = IV_URL
    *          PROXY_HOST         = '10.1.1.1'
    *          PROXY_SERVICE      = '1234'
    *       SSL_ID             =
           IMPORTING
             CLIENT             = HTTP_CLIENT
           EXCEPTIONS
             ARGUMENT_NOT_FOUND = 1
             PLUGIN_NOT_ACTIVE  = 2
             INTERNAL_ERROR     = 3
             OTHERS             = 4.
      CHECK SY-SUBRC = 0.
      CALL METHOD HTTP_CLIENT->SEND
        EXCEPTIONS
          HTTP_COMMUNICATION_FAILURE = 1
          HTTP_INVALID_STATE         = 2.
      CHECK SY-SUBRC = 0.
      CALL METHOD HTTP_CLIENT->RECEIVE
        EXCEPTIONS
          HTTP_COMMUNICATION_FAILURE = 1
          HTTP_INVALID_STATE         = 2
          HTTP_PROCESSING_FAILED     = 3.
      CHECK SY-SUBRC = 0.
      iv_data = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
    endform.                    "get_data_from_url
    Edited by: Ozcan Gurdal on Aug 11, 2010 4:07 PM

  • How to read the source code

    Hi,
    I want to know how to read the source code of web dynpro java from the source folder i.e. without loading the project in NWDS. Please answer me as soon as possible.
    Thanks & Regards,
    Aniruddha

    Hi,
    If you are using DC's then you can find the .Java files in the path
    <project Name>\_comp\gen_wdp\packages\<Pacjage>\<ComponentName>\..
    In the above path you can find the Java files of the controllers.
    Thanks,
    Raju Bonagiri

  • How to clean the html code multiple pages simultaneously with Dreamweaver or other soft ?

    hello,
    How to clean the html code multiple pages simultaneously with Dreamweaver or other soft ? I have hundreds of pages to clean
    Thanks !

    I would start afresh. I would also use Dreamweaver's template system to make thing a lot easier. Have a look at the following, copy and paste into a new document and view in your favourite browser.
    <!doctype html>
    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" />
    <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
    <script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <style>
    .hline {
        background: url(http://yannick.michelat.free.fr/barre.gif);
        height: 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    </style>
    </head>
    <body>
    <div class="container">
        <div class="row">
            <div class="col-xs-7">
                <img alt="" class="img-responsive pull-right" style="margin-top:20px;" src="http://yannick.michelat.free.fr/Calanques.gif" />
            </div>
            <div class="col-xs-5">
                <img alt="" class="img-responsive center-block" style="margin-top: 40px;" src="http://yannick.michelat.free.fr/grandportfolio.gif" />
            </div>
        </div>
        <div class="row hline"></div>
        <div class="row">
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-01.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-02.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-03.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-04.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-05.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-06.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-07.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-08.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-09.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-10.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-11.jpg" alt="" class="img-responsive"></a></div>
            <div class="col-xs-6 col-sm-4 col-md-2"> <a href="#" class="thumbnail"> <img src="http://yannick.michelat.free.fr/vign__CalanquesConseil-12.jpg" alt="" class="img-responsive"></a></div>
        </div>
        <div class="row hline"></div>
    </div>
    </body>
    </html>

  • Is it possible to export the html code from a muse site that I am building?

    Is it possible to export the html code from a muse site that I am building?

    Mac_Heibu has the right idea. When you export your site to HTML, it creates a folder that contains all of your pages. Here's an example of what the folder will contain. All of your HTML pages, all your scripts, CSS, and it'll also have individual folders WITHIN your main folder for your phone or tablet versions, if applicable. This method allows you to upload your files to an FTP host. However, if you're trying to upload it to an FTP, the BETTER option would be to go File > Upload to FTP Host. If this has helped you, please mark mac_heibu's answer as the Correct Answer, and feel free to mark my reply as a Helpful Answer.

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to read the html source code of a webpage.

    How can I read the html source code of a webpage with a java application?
    Is there a good idea?

    >
    How can I read the html source code of a webpage
    with a java application?
    Is there a good idea?
    I don't know if this is a good idea, but it works.
    1) Use a URL to obtain the document's location
    2) Use a URLConnection to open a connection between your computer and the
    document server
    3) Connect to the server
    4) Get the InputStream of said connection
    5) Associate the Input Stream with a Buffered Input Stream
    At this point you can use a loop to read lines from the BufferedInput Stream and append them to a TextArea or other suitable text component.

  • How to capture the ok-code from xd01 to my program

    Hi All,
    I have a big problem. I have created a t-code zxd01 and my program zsapmf02d. In my t-code, in my first screen it looks like xd01 first screen and extra some custom fields.
    In my first screen it has buttons, if they click on "create" button on 1st screen i am calling "Call transaction xd01 and skip first screen". Its calling xd01 2nd screen and remaining things xd01 functionality. but when user presses any ok-code, its coming back to my program. I don't want do this thing for some ok-codes like "enter". How to do this? I am thinking if i capture the ok-code from xd01 and when its coming back to my progarm, i can tell it behave differently.
    How to capture it? Is there any userexits to capture the ok-code, from there using export and import?
    Its a high priority issue. Please help me.
    Thanks

    Sankar,
    Believe creating multiple threads will not help in resolving the issue faster. Please close the other two threads. It will help the members in answering your question properly and it will become easy for you to track the solution also.
    Please understand and read the rules of engagement )
    Thanks,

  • How to read the source code of class method

    Hi,
    I want to read the source code of a method which is in a BAdi implementation.
    I used SEO_METHOD_GET_SOURCE function module where I passed interface name as class and method name.
    But I didn't get the source code. Is there any other function module of method to read the source code.
    Thanks and regards,
    Venkat.

    Hi Venkat,
      You can still use the Function Module SEO_METHOD_GET_SOURCE with a small change in the parameter passing. It should be:
    Paramaters:
    MTDKEY-CLSNAME : <Implementaion Classname>
    MTDKEY-CPDNAME: <Interfacename~methodname>
    STATE : 'A' for active or 'I' for inactive
    For example:
    MTDKEY-CLSNAME :ZCL_IM_PLM_AUDIT_ALV_GRID
    MTDKEY-CPDNAME: IF_EX_PLM_AUDIT_ALV_GRID~ON_USER_COMMAND
    STATE: A
    After executing you will get the source code in the form of string in the 'SOURCE' parameter.
    Hope this helps you.
    Regards,
    Swarna Munukoti

  • How to read the field type from field id of DynamicFldTbl

    Hi,
    In my application, i am using DynamicFldTbl, whch parses FML32 field table definition file. My field table definition file contains information about field names and its types.
    I checked the API of DynamicFldTbl and didn't find any API to get the field type from field it.
    Any way to read the field type from field id?
    Thanks in advance
    Raguraman

    Hi Raguraman,
    Once you have the field table, you can then create an FML32 buffer (TypedFML32) using the constructor that takes a field table, and then use the Fldtype() method on the specific field ID you wish to get the type of. I know this is sort of tedious and we should provide Fldtype() and some others on the field table class directly.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Extracting the largest code from a specific section in the report

    Post Author: MikeA-ICE
    CA Forum: General
    I have a report that has 8 sections, called Report Areas. Each area is limited by a range of codes (Group1). For the whole report the codes range from 01 to 93. There is one particular area in the report, Area 2, that spans 01 to 29. I need to extract the largest code from Area 2 but I never know from one time to the next when running the report what codes will be included. There could be any number of codes in a particular run of the report. I could have 1, 3,4,5, 7, 11, & 16 one time and 1, 2, 3, 8, 9, 12, 21, 23, and 28 the next. I tried this formula:If {CBIRptTotalSummary.ReportArea} = 2ThenNthLargest (1, {CBIRptTotalSummary.Group1})This consistently printed 93 in Area 2 of the report since 93 is the largest code of Group1 in the report. I've tried numerous other formulas and I can't get Crystal to look only at the groups contained in Area 2 and tell me what the largest group is in that area. How would I accomplish this? Thanks  very much for your help!!Mike

    Post Author: Jagan
    CA Forum: General
    Do you group on ReportArea?If so, it's the maximum(Group1, ReportArea)

  • How to get the html source for these web page ?

    My code work well for standart page, but I'm unable to get the html source from these page with my vb program :
    http://www.slashdot.org
    http://userfriendly.org
    http://segfault.org
    here my code
    private sub commandgethtml_Click ()
    Inet1.Cancel
    Inet1.Protocol = icHTTP
    Inet1.URL = theURL
    HTMLcode = Inet1.OpenURL(theURL, icString)
    RichTextBox1.Text = HTMLcode
    end sub
    thanks in advance.

    Hello Cyrano,
    This Developer Forum focuses on the National Instruments product "Measurement Studio for Visual Basic" (formerly known as ComponentWorks). Our goal is to help people to better integrate this product into their test, measurement, and automation applications. Your question directly pertains to the Microsoft Internet Transfer Control. I think you would find an increased number of responses that are better focused on your question if you would repost it to a forum that specializes in general VB and internet programming. Good luck!
    Jeremiah Cox
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • How to retrieve the parameter names from a JSP page ? Urgent Please

    Hello,
    Can anybody tell me how to retrieve the parameter names from the JSP
    page. (without using getParameterNames() method.)
    The problem with the getParameterNames() method is I get the Jumbled output.
    I need it very badly
    With regards
    Ananth R
    email:[email protected]
    [email protected]

    Dear duffymo,
    My primary intention is to convert the JSP form information into a XML file.
    If I do not get the Parameter names in the correct order how can I maintain
    tag order in XML file.
    For ex: (JSP PAGE VIEW)
    Name--
    FirstName
    MiddleName
    LastName
    Address--
    Street1
    Street2
    City
    Country
    &so on
    (XML File to be generated)
    <Name>
    <FirstName>Value</FirstName>
    </Name>
    <Address>
    <street1>value</street1>
    </Address>
    & so on
    If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
    order means: Order of entry on the page, from top to bottom
    That's it
    Waiting for your responses

  • How do I see the HTML code of my web page?

    How do I see my web page's HTML code? I want to install Google Analytics and I have to insert the tracking code into a certain part of the web page's HTML code, but iWeb doesn't show me the code to manually manipulate it.
    Is this even possible? I am looking for a view that shows me all the code and can't find it.

    You'll see the HTML after publishing the pages.
    Here's a way to add Google Analytics :
    [Adding Google Analytics without editing the webpage|http://www.wyodor.net/blog/archives/2010/05/entry_316.html]
    And if you search this forum you'll also find answers : [google analytics|http://discussions.apple.com/search.jspa?objID=c188&search=Go&q=googl e+analytics]

  • How to delete the TXN codes from Tcode Field

    Dear All,
    Can any one help me in removing the tcode list from the transaction code field where we execute tcodes from?
    Also, in the login screen of SAP, it suggest the list of users who accessed SAP recently. I want to delete that as well.
    Your help would be appreciated.
    Thanks in advance.
    Regards,
    Faisal

    Hi Manu,
    Thanks alot for your reply. I did as you have directed. In the login screen, now i dont find those recently used user ids. However, in transaction code field still the recently used tcodes are available. How do i remove them from there?
    Regards,
    Faisal

Maybe you are looking for

  • New ipod touch won't charge/sync on the computer or using a wall charger?

    My new ipod touch was working and i synced it on itunes and downloaded some apps and then it suddenly could not recognise it and stopped syncing. it came up with error 0xe8000001 and said the iphone cannot be found, eventhough it's an itouch not ipho

  • Message stuck in queue: Sequence already terminated

    Dear all, in my scenario I splitt a message and send it to two receivers. Sender RFC Receiver  (both) : JDBC The first message stuck with error message: <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Sequenc

  • SM37 Job is not visible in SM50

    Hello Gurus,   I am seeing a peculiar situation- We ran a job and after a while I am seeing it has dissappeared from SM50 but has "Active" status in SM37. *We have only one application server.   Does anybody have any idea how it could be cancelled. C

  • ChaRM: approving of a change request by various list of end users

    Dear, experts. Can I customize ChaRM so, that before initiating change request  a support message should be approved by  by various list of end users depending on component (component A - list 1, component B - list 2)? For example some end-user wants

  • How to export&import data using sql *loader

    Hi all, How to export&import data from sql*loader. Give me the clear steps.. Thanks in Advance