Html code(source code) for  a web page

hi all
i want to get the source code for a web page throgh
my java program .please can you tell me how to do it.
thanks

give this a try.
import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.io.*;
public class JApplet1 extends JApplet
     public void init()
          getContentPane().setLayout(null);
          setSize(470,391);
          JButton1.setText("google.com");
          getContentPane().add(JButton1);
          JButton1.setBounds(12,12,120,24);
          getContentPane().add(JScrollPane1);
          JScrollPane1.setBounds(12,48,444,336);
          JScrollPane1.getViewport().add(JTextArea1);
          JTextArea1.setBounds(0,0,440,332);
          SymMouse aSymMouse = new SymMouse();
          JButton1.addMouseListener(aSymMouse);
     javax.swing.JButton JButton1 = new javax.swing.JButton();
     javax.swing.JScrollPane JScrollPane1 = new javax.swing.JScrollPane();
     javax.swing.JTextArea JTextArea1 = new javax.swing.JTextArea();
     class SymMouse extends java.awt.event.MouseAdapter
          public void mouseClicked(java.awt.event.MouseEvent event)
               Object object = event.getSource();
               if (object == JButton1)
                    JButton1_mouseClicked(event);
        URL u;
     URLConnection conn;
     InputStreamReader in;
     BufferedReader data;
     String line;
     StringBuffer buf = new StringBuffer();
     void JButton1_mouseClicked(java.awt.event.MouseEvent event)
         try{
             u = new URL("http://www.google.com");
              conn = u.openConnection();
              in = new InputStreamReader(conn.getInputStream());
              data = new BufferedReader(in);
              while((line = data.readLine()) != null)
                  buf.append(line + "\n");
              JTextArea1.setText(buf.toString());
          }catch(Exception e){}
}

Similar Messages

  • 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]

  • Translating html code into.. web page

    If I am downloading an HTML document from the WWW, i.e. a web page, how can I handle it so that what is actually shown on my GUI component (which is of type JTextArea) is the final "page" (as shown by any standard Web browser) rather than just html code?

    You can use a JEditorPane with its content type set to "text/html".
    You may it helps to call editorPane.setEditable(false) as well.
    Have a look at the Javadocs for JEditorPane for examples.
    Hope this helps.

  • How can I get HTML source code of dynamic Web page ?

    Hi,
    I would like to write a program that can get HTML source code of some Web pages, but there are some dynamic Web pages that I can't do it with URL class. For example: http://www.europlex.ch/web/3schedule/showAll.jsp?context=schedule.
    Thank you very much for any solution.

    Thank you for your attention. I'm sorry because I could't describe it clearly. If you don't mind, please follow this step to understand my problem:
    In the browser, enter URL: http://www.europlex.ch/web/main.jsp?locale=_english
    Click on Schedule, you will see the page with Cinema name, Film, Time... I would like to write Java Program to get HTML code of only this Page (Not frame page).
    Do you have any idea ?
    Thanhks,

  • Retrieving HTML source code of a web page

    Hi,
      I want to take the HTML source code of a web page. How can I take?
    Thanks and regards,
    Venkat.

    You can do that with the class "cl_http_client".
    Sample code:
    DATA: http_client TYPE REF TO if_http_client .
    DATA: w_string TYPE string ,
    w_result TYPE string ,
    r_str TYPE string .
    DATA: result_tab TYPE TABLE OF string.
    START-OF-SELECTION .
    CLEAR w_string .
    w_string = 'http://urlhost/Logs/main.asmx/SetLog'.
    CALL METHOD cl_http_client=>create_by_url
    EXPORTING
    url                = w_string
    IMPORTING
    client = http_client
    EXCEPTIONS
    argument_not_found = 1
    plugin_not_active  = 2
    internal_error     = 3
    OTHERS = 4.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
    EXPORTING
    NAME = '~request_method'
    VALUE = 'POST'.
    CALL METHOD http_client->REQUEST->SET_FORM_FIELD
    EXPORTING
    NAME = 'title'
    VALUE = 'Mail sistema'.
    CALL METHOD http_client->REQUEST->SET_FORM_FIELD
    EXPORTING
    NAME = 'details'
    VALUE = 'Funcion 1234'.
    CALL METHOD http_client->send
    EXCEPTIONS
    http_communication_failure = 1
    http_invalid_state         = 2.
    CALL METHOD http_client->receive
    EXCEPTIONS
    http_communication_failure = 1
    http_invalid_state         = 2
    http_processing_failed     = 3.
    CLEAR w_result .
    w_result = http_client->response->get_cdata( ).
    REFRESH result_tab .
    SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE
    result_tab .
    READ TABLE result_tab INTO r_str INDEX 2.

  • Read Source code of a Web Page

    Hi,
    Could anyone suggest an ABAP Function module which when given a web page URL as input downloads the source code of the web page into an internal table. Thanks.
    Regards,
    Prabaharan.

    Hi,
    Chek this link:
    Extracting data from a HTML / XML web page
    Hope it helps you.
    Pleae reward helpful answers.
    Best Regards,
    Anjali

  • HTML code for region position 3

    Hi All,
    Can i get the HTML code for display point: Region position 3.
    My requirement is, i have to apply some background color to all the regions which are placed in region position 3.

    Chandran wrote:
    Hi All,
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should normally include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    For layout and visual formatting issues the APEX version, browser, theme, page and region template, and region/item details are always required.
    Can i get the HTML code for display point: Region position 3.
    My requirement is, i have to apply some background color to all the regions which are placed in region position 3.Region position 3 is determined by the location of the substitution string<tt>#REGION_POSITION_03#</tt> substitution string in the page template. This will vary by version, theme and page template, which is information you have not provided.
    Regions located in region position 3 will probably have existing background colours determined by their region templates. Is the requirement to apply a background colour to individual regions, or a background colour underlying all of the regions?

  • HTML code for adobe forms/formsCentral

    Anyone has the HTML code for any of these forms? I would like to add one of the forms to my website.
    Thx

    Hi,
    FormsCentral has Embed Form feature which enables you add a FormsCentral form to your web site. Please check out the first part of the document on how to embed a form into an html page: http://forums.adobe.com/docs/DOC-1991.
    Thanks,
    Wenlan

  • Code for Responsive Web gallery

    Hi, I'm looking for some sample code for Responsive web galleries. Not Flash ones. Web ones.
    Ones that will respond to tablets, pads, and various web pages, including iPhone/iPad even (no flash)
    Straight forward web pages are fine. Maybe HTML5, and Responsive.
    Thanks for any help.

    Have you checked out http://shop.theturninggate.net/collections/core-elements-3/products/2014-html-gallery to see how they do it?  It is a free gallery for Lightroom 4/5 and you should be able to take a look at the code and see how it was done.  That should get you going in the right direction.

  • Can i have html code for date select options (SEARCH HELP)

    Hi frinds,
    I have a BSP Page with input as date.
    Can i have html code for date select options (SEARCH HELP)
    Moosa

    Hi
    Please find the sample code below.
    FROM DATE
          <htmlb:inputField id        = "dd"
                            width     = "45%"
                            type      = "DATE"
                            showHelp  = "X" <- Search help
                            alignment = "CENTER"
                            maxlength = "10"
                            disabled  = "TRUE"
                            value     = "<%= w_FROMDATE %>" />
    TO DATE
          <htmlb:inputField id        = "dd"
                            width     = "45%"
                            type      = "DATE"
                            showHelp  = "X"
                            alignment = "CENTER"
                            maxlength = "10"
                            disabled  = "TRUE"                      
    value     = "<%= w_TODATE %>" />
    Thanks
    kalyan

  • Help with some html code for flash site!

    Got this site>
    http:/www.thedesignport.com
    Site works great! everything is uploaded! What I cant seem to
    get workning is the html code to add a description under the title
    of the website in a google search? Goto google enter "topanga
    mountain school" I'm top spot on the second page but with NO
    description?? have a look at the html code for
    http://www.thedesignport.com
    Have I gone wrong somewhere?? But I've found if you put
    "topanga mountain school pdf" into google ( I have three pdf's on
    the site) My site is Second on the search with a DESCRIPTION of the
    pdf's under the site name?? I dont get it?? Any help would be
    great!

    You're not getting any help here because this is the forum for discussions of the Community Help Client application and Help system in general. For CSS questions, you should probably try something like the Dreamweaver forum.

  • Html-code for showing cover of current issue?

    Has anyone an example of a simple html-code for showing the latest issue?
    All I need is the adress to the image-file.

    There was a problem like that in the WYSIWYG before 7.0.2 as
    described in Using RH7 on my site. However, that was local and the
    patch fixed it.
    I had a completely different problem a while back but wonder
    if the solution might work. Speak to your web guys and suggest
    this.
    Add the AddDefaultCharset utf-8 directive to either the
    Apache config or the site .htaccess file
    It's a long shot. I don't know what other effects it might
    have on your server but the web guys should.

  • Where is the HTML-Code for the Dashboard-Links defined? How to edit it?

    Hello everyone,
    I'd like to know where HTML-Code for the Dashboard-Links (My Dashboard, insert random Dashboardname here, ...) is defined.
    Inspecting HTML-Code via the browser, i'll got the following HTML-Tag:
    an <a'' href="...url"... class="CurrentPortal" name="DashboardBannerLink" title="...">Dashboard-name</a''>
    What i know is, that i can modify portalbanner.css and edit the style of those links.
    But thats not what i want, though. I want to modify the html-code itself, for example change the layout of the table etc, to meet our company's corporate design requirements.
    Thats why i tried to find the terms PortalLink and CurrentPortal within the Message-Database (/msgdb).
    Unfortunately, i got no results.
    As a consequence, I believe HTML for those Links is generated by saw.dll internally and therefore can not be edited.
    Now i need someone to prove me wrong ;)
    Thanks in advance,
    Chris
    Edited by: Chris2010 on 16.08.2010 11:11
    -had to edit the html tag, as the code was turned into a clickable link when i posted the thread

    I still didn't find a solution until now, although i checked almost every xml file, that i was able to find.
    At the moment I am sure, that it would be necessary to edit sawm-Parameter "bannerHtml" to meet my requirements. Now, i dont know whether its possible to edit it or not, since those saw-parameters do not seem to be documented on the web.
    That's the part, i found in dashboardtemplates.xml (Line: 362)
    <WebMessage name="kuiDashboardBanner" translate="no"><!-- Param bannerHtml --><!-- Param dashboardsURL -->
    <HTML>
    <table class="PortalBanner" width="100%" border="0" cellspacing="0">
    <tr>
    <td class="PortalLogo">
    "<\a href="@{dashboardsURL}">
    <img class="PortalLogoImage" border="0" src="fmap:Portal/PortalLogo.gif"/></a>
    "</td>
    <td class="PortalTop" style="vertical-align:top">
    <sawm:param name="bannerHtml"/></td>
    </tr></table>
    <sawm:messageRef name="kuiDashboardMainBar"><sawm:setParam name="product">dashboard</sawm:setParam></sawm:messageRef>
    </HTML></WebMessage>
    -----

  • [ask] html code for linksys wvc200

    guys, i have project for distance learning site. in this project, there is live streaming using ip camera when the lecturer was teach student. i have bought ip camera linksys wvc200, to make this online and become live streaming site, i must have HTML source code for this to place at php. do you guys have the HTML CODE for this?? really urgent, i need it.. please help me, because i am newbie..

    Hi ekopamungkas and welcome to the Cisco Home Community!
    The WVC200 is now being handled by the Cisco Small Business Support Community.
    For discussions about this product, please go here.
    https://supportforums.cisco.com/community/netpro/small-business
    The Search Function is your friend.... and Google too.
    How to Secure your Network
    How to Upgrade Routers Firmware
    Setting-Up a Router with DSL Internet Service
    Setting-Up a Router with Cable Internet Service
    How to Hard Reset or 30/30/30 your Router

  • Embeding HTML code to Flash Catalyst pages

    I know Adobe discontinued FC but i still have a question. I'm planing to add HTML code for calendar page ( i m planing to use google calendar' code) in my FC but i couldnt find enough info how to do. I also created empty layer in PS for calendar page but dont know rest
    I appreciate if you d help me. Thanks

    I found one (http://forums.adobe.com/message/3769044#3769044) but it hasn't been answered yet. I'm not good at ActionScripts yet so seems it s gonna be painful for me. Anyway thanks for the answer Chris, at least at the moment i know the steps that i should do.

Maybe you are looking for

  • Why is my last thread I entered locked?

    Can somebody tell me how to unlock my last thread I entered which is "I search for the SAP transaction for customer part-payment" Thanks, Anita

  • Query required for xml processing.

    This data is present in clob i need to extract the below mentioned field. expected query is select extractvalue( xmltype(table1.column1), '/UserProfileSnapshot/UserInfo/Attribute[@name="Users.Display Name"]' ) from table1 first line is incorrect <?xm

  • Viewing photos (JPG) on a Touchpad

    Can I ask where are you supposed to put  photos which I have transferred across using USB Mode. it doesnt seem to show them even after a reboot. I just put them in separate folders in the root  directory Also does anyone know of an app that will view

  • Transfering Videos from 5800 to PC

    I have created a few videos on my 5800 and they are stored in my gallery. How do I now transfer them onto my PC ?? I've tried usuing the Ovi Suite but it doesn't work !! Thanks

  • Background of imported .psd file showing grey green rather than black?

    Hi, the background of a .psd file imported into FCP is displaying a dull green background rather than black...do I need to coordinate the default FCP color profile with Photoshop or...? Thanks (Oh...and, just out of curiosity, what does a person gain