How to read the code of html page

Hi,
I want to know how to read the code of html page through Java? And if anyone know the link of full implementation of Page Rank Algorithm in Java.
Please let me know. I have to do the project on that topic.
Regard
Vivek

Vivek_NITT wrote:
I want to know how to read the code of html page through Java? Get the input stream from an HttpUrlConnection. Read from it like from any other stream.
And if anyone know the link of full implementation of Page Rank Algorithm in Java.Which one?

Similar Messages

  • How to read the content of html page? (written in JSP)

    The same with readContent("http://www.urcompany.com/readPage.html")

    The body of your topic post is not as clear as its subject.
    If you want to know how to write a Java program to retreive the contents served from a URL, see http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
    Also read Javadocs for java.net.URL and other relevant classes in java.net

  • How-to show XML code into HTML page???

    I have not formatted String,
    String str = <target name=\"-post-compile\"><obfuscate><filesetdir=\"${build.classes.dir}\"/ > </obfuscate></target>;
    how I can show this String on Web page in the this format?
    <target name="-post-compile">
            <obfuscate>
                  <fileset dir="${build.classes.dir}"/>
            </obfuscate>
    </target>Thanks.

    You would need to escape all of the characters. ie < should become &lt; and > should be &gt etc etc; You would probably also have to put in the tabs/<br> tags in appropriate places.
    The JSTL c:out tag which automatically escapes characters for you, but how you want it laid out is completely up to you to program.

  • How to read the content of HTML table

    Hi All,
    I would like to retrieve the content of the following HTML table and is wondering whether there are any libraries/jars that could do the job easily without having to write a parser possibly in XSLT:
    <td class="propType"><b>Address</b></td>
                            <td class="propType"><b>Company</b></td>
                            <td class="propType"><b>Department</b></td>
                            <td class="propType" align="right"><b>Employee</b></td>
                                    <td colspan="6"><strong class="propType">
                                    <td><strong>Firstname</strong></td>
                                    <td><strong>Surname</strong></td>
                                    <td><strong>DOB</strong></td>
                                    <td><strong>Sex</strong></td>
                                    <td class="even">John</td>
                                    <td class="even">Smith</td>
                                    <td class="even">01/02/2001</td>
                                    <td class="even">Male</td>One awkard method is by using the stringbuffer as follows:
    String greaterthanSignedList[] = greaterthanSigned.split(">")
    to pickup all the text that comes after the greater than (ie ">" sign)...
    String lessthanSignedList[] = lessthanSigned.split("</"</" sign) ...
    However, I am sure that there must be an easier way to do this such as using existing SAX/DOM/XSLT.. jars to retrieve these values quickly.
    Many thanks,
    Jack                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    I am wondering if you could be a little patient with your guidance in this area. Perhaps a few points on what are some of the classes that should be used. Even an example would be terrific, if possible.
    I have slowly weighing through 2 books - Learning XML by Erik T. Ray (http://www.oreilly.com/catalog/learnxml2/toc.html) and Java & XML by Brett D. McLaughlin & Justin Edelson (http://www.oreilly.com/catalog/9780596101497/toc.html) but would like to dwell into the relevant chapter and by pass anything else that is not relevant to my current in the XML area in order to fast track development.
    I am new to XML and would very much appreciate if you could point to the area of specific to focus on getting this job done only.
    Many thanks again,
    Jack

  • 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 change the textarea to html editer in knowledge maintenance page ?

    Hi, experts,
    When we maintain the knowledge, we typed infomation into the textarea.
    Now we want to use html tags to show the knowledge info, so that the text can be shown in html table.
    how to change the textarea to  html editer ?
    Thanks.
    Oliver.

    closed.

  • HT2736 I can't read the code on the back of the card. It was scratched off. How do I redeem?

    I can't read the code on the back of the card. It was scratched off. How do I redeem?
    Pjs

    Try  >  http://support.apple.com/kb/TS1292
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I can't read the code to type when posting on the community page like craigslist

    Hi,
    I'm troubled when posting in craigslist through firefox.
    I cannot read the code or a word to type when posting for a security purpose (spam). This problem has started a couple months ago with Firefox. With Safari, this does not happen.
    Appreciated if you can help me out here because I use firefox as my primary internet browser.

    Basics from the manual are restrt, reset, restore.
    Have you tried each of these?

  • How to call java program by HTML page

    Hi guys,
    I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
    I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
    If you have small sample,pls send to me. [email protected], thanks in advance
    Jian

    This code goes with the tutorial from this web page
    http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
    good luck.
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:mySubprotocol:myDataSource";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("myDriver.ClassName");
         } catch(Exception ex) {
         setError("Can't find Database driver class: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,
                                  "myLogin", "myPassword");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

  • How to read the pop-dialog window data in adf

    HI All,
    Using the jdev 11.1.1.6.
    I have two questions here :
    1) How to read the selected table row data from the Pop -dialog window .
    2)hOw can i forward to another URL view/view after selecting the data on dialog window and then click 'ok".
    NOte : One of the blog says ' we cant apply the action and actionListener on button ,if we apply showPopupbehavious ,SO how can i forard to another page/URL view ? ,
    scenario:
    Upon click of some button , infomration ll be displayed on pop-dialog window and then user will select the any one of the row and click "OK"
    . based on some data check i should forward it to the view/urlView .
    any hits highly appriciated
    thanks

    1) How to read the selected table row data from the Pop -dialog window .simple . get the employeevo and jobvo with relationship(fk or association/viewlink) drop the employee vo as af:table. show a detail icons at the end of column. make popup with show popup behaviour with lazyuncached drop the af:dialog it wiil show the details in job of concern employee
    2)hOw can i forward to another URL view/view after selecting the data on dialog window and then click 'ok".
    NOte : One of the blog says ' we cant apply the action and actionListener on button ,if we apply showPopupbehavious ,SO how can i forard to another page/URL view ? ,can you show the blo url to me.
    grasp things.
    http://hazem-adf-tips.blogspot.in/
    https://blogs.oracle.com/jdeveloperpm/entry/how-to_efficiently_redirect_to_an_adf_faces_view_using_adf_controller
    http://adf-lk.blogspot.in/2011/06/oracle-adf-how-to-redirect-url-in-bean.html
    http://adfdeveloper.blogspot.in/2011/07/adf-auto-redirect-while-still-passing.html
    http://www.slideshare.net/baigsorcl/oracle-adf-task-flows-for-beginners
    http://www.techartifact.com/blogs/2012/03/adf-jsf-some-handy-code-for-backing-beans.html

  • How to read the and Write the PDF file give me the solution

    Hi all,
    How to read the and Write the PDF file give me the solution
    My coding is
    import java.io.File;
    import com.asprise.util.pdf.PDFImageWriter;
    import com.asprise.util.pdf.PDFReader;
    import java.io.*;
    import java.io.FileOutputStream;
    public class example {
    // public example() {
         public static void main(String a[])
              try
              PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
                   reader.open(); // open the file.
                   int pages = reader.getNumberOfPages();
                   for(int i=0; i < pages; i++) {
                   String text = reader.extractTextFromPage(i);
                   System.out.println("Page " + i + ": " + text);
    // perform other operations on pages.
    PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
                   writer.open();
                   writer.addImage("C:\\sam.doc");
                   writer.close();
                   System.out.println("DONE.");
    reader.close();
              catch(Exception e){System.out.println("error:"+e);
              e.printStackTrace();
    I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
    Please give response immtly
    i am waiting for your reply.
    thanks,
    Suresh.G

    I have some question flow
    How library to use this code.
    I try runing but have not libary.
    Please send me it'library
    Thank you very much!

  • How to print the Terms and Condition page ine the sap-script

    Hi experts,
                             i got the requirement that how to print the Terms and condition page in the script,i have the three pages, having the same main window, in the last of the main window(all three pages)  i have called the hard coded text(i.e so10 text), but when i am displaying the output  data get printed in the first page but i am getting the second page heading on the top of  the terms and condiions page. In all the three pages i  have the same main window, if i  make change in any window i will affect all the other main  windows.  so please suggest me how i need to go.HOW TO GET GRID OF THE TEXT ON THE TOP OF THE SECOND PAGE OF THE TERMS AND CONDITONS.
    like this i have called in the MAIN WINDOW
    /E : LAST ( IN ALL THREE PAGES)
           INCLUDE ZSD_INVOICE_TERMS TEXT OBJECT TEXT LANGUAGE EN.
    IN THE TCODE SO10
    NEW PAGE TERMS.
    1) TERM MS AND CONDITONS  TEXT.................................................
    FIRST->NEXT, NEXT->NEXT,,   TERMS--->TERMS.

    Hi,
    1. Create a new page by Name : LAST
    2. Identify the text element which will be the last element in the form in the debug mode.
    Mostly Ex: SUM, TOTAL, LAST etc.,
    3. the page linking should be
    First --> Next
    Next --> Next
    4. In the Text element identified in the step 3.
    Write the following code
    /: NEW PAGE  LAST
    /: INCLUDE the standard text created for the terms and conditions in SO10
    Check the syntax for the command but the logic will be the same.
    It should resolve your problem.

  • How to read the DB application error in JSP

    We have the PL/SQL triggers that perform validations on the insert and update. If validation fails the RAISE APPLICATION ERROR is used.
    On error the errorpage.jsp is called correctly, but my problem is that I can not read the actual error message from database.
    All I am getting from exception.getMessage() is the JBO message. The exception.printStackTrace() does not help either. How can I read text of PL/SQL exception message ?
    I have tried this test in errorpage:
    if( exception instanceof oracle.jbo.JboException ) { ...}
    but apparently the exception is not JboException, since test fails.
    I read about ApplicationModule.setExceptionHandler() and even build exception handler which does not do anything. I assumed that this would allow all exceptions to be passed to the error page. Nothing like that happens though. I still see only last JBO exception, I can not see the original DB exception.
    Thanks in advance,
    Michael

    Hi ankur,
    thanks for the quick reply,
    I have got the answer for the first question.
    Can u tell me solution for the 2nd question also. how to read the Portal user information in VC. like reading the Portal user information in webdynpro.
    In webdynpro we can read any of the portal user properties or information like using the following code.
    Itry{
    IWDClientUser user = WDClientUser.getCurrentUser();
    String fName = user.getFirstName();
    String lName = user.getLastName();
    }catch(Exception e){
    In the same way to read the portal user information in VC. BCz for every portal user we have created one custom properties, we need to read that propety value in my vc application, when the user logged in to portal and accessing integrated VC application.
    I have seen one of the thead this is possible from VC7.0 of NW2004s, current my version is also the same.
    Portal 7.0
    VC 7.0
    If u know how to do that, can u let me know.
    Regards
    Vijay

  • How to read the API

    I am trying to understand how to read the Java API. I have bought Oracle's Books "Java The Complete Reference" and "Java A Beginners Guide" but am still unsure how to read the API.
    Let me clarify what I'm asking to avoid confusion.
    The class java.util.ProcessBuilder http://download.oracle.com/javase/7/docs/api/
    Has a Constructor section that lists
    Constructor and Description
    ProcessBuilder(List<String> command)
    Constructs a process builder with the specified operating system program and arguments.
    ProcessBuilder(String... command)
    Constructs a process builder with the specified operating system program and arguments.
    How do I read the ProcessBuilder(List<String> command) so that I can understand it and implement its use?
    Later when it talks about methods such as List<String>      command()
    Returns this process builder's operating system program and arguments.
    How do I understand this and make use of the method?
    Is it possible for this to be explained to cover the whole API so that when a class is looked up the constructor and methods are explained that someone who does not understand can take any class and have the constructor and methods from the API and know how to implement them?
    Thank you
    FtroopSon

    FtroopSon wrote:
    My Instructor said we can not work with others on our project, so instead of violating that rule, I asked something about JAVA here. My question was general enough to not violate the instructors rule, but specific enough to learn what I felt I was missing.I hope you don't think I was suggesting you're doing anything wrong - far from it - I was simply saying that ProcessBuilder isn't the first class I would choose if I was trying to get familiar with the Java API pages.
    As with a lot of questions like this, Google is your friend. A Google of "using ProcessBuilder" gave me a pile of useful pages on how to use the class (which the API docs aren't always wonderful at doing), including some common 'gotchas' - although many of these are related to <tt>Runtime.exec()</tt>, which Process/ProcessBuilder was created to improve.
    One of those pages was for [url http://commons.apache.org/exec/index.html]Apache Commons Exec, which you might also want to look at (although it does require a download, and that might violate the rules of your exercise too). I've never used it myself though, so I can't comment on how good it is.
    Alternatively, it might be worth talking to your instructor and explaining your problem. Most of us are reasonable chaps, and s/he might be able to provide you with some good tips.
    Remember: plagiarism is the programmer's stock-in-trade. There's nothing wrong with using something written by someone else as long as you attribute it - that is, after all, what classes are all about :-).
    Winston

  • How to embed Typekit code in Muse pages?

    How to embed Typekit code in Muse pages?

    Hi Enu1,
    Currently, you can only use and preview the free and open-source Typekit fonts in Muse.
    If you're comfortable with a little HTML/CSS, the Muse Insider wrote a post on how to insert the Typekit embed code from the Muse interface:
    http://museinsider.com/how-to-add-typekit-fonts-to-your-muse-site.html
    Or you can add the embed code to the Page Properties dialog within Muse, which will include it in the <head> of the page when you export your website.
    However, we do see the value of being able to design in Muse with all the fonts in your Typekit library. This will require a deeper integration between Typekit & Muse. I'll give the team a nudge in this direction for you.
    Let me know if you have any further questions and thanks for your patience.
    Cheers,
    Benjamin

Maybe you are looking for

  • How do you move an Event Library without moving the physical media

    I've got a large library of media that needs to be organized, with new keywords.  I have multiple people on different computers attacking portions of the media all stored on a single raid, accessed via gigabit ethernet.  When the libraries are create

  • IPod Nano 2nd Gen - Music Subfolder no longer appears under iPod Device

    When in iTunes I manually manage my music and I used to get a subfolder under iPod in Devices which I could click on and it would show me the songs I had put on my iPod and I could add and delete at will. Since getting latest update of iTunes, the su

  • Materialized View with recursive join

    Why is this not allowed? create materialized view bone_mv refresh complete on commit as select a.pk from tablea a, tableb b, tableb b2 where tablea.col1 = b.col1 and tablea.col2 = b2.col2 If I use "on demand" there is no problem.

  • Error in sla

    Hi All, we are on R12. I am running create accounting in AP, and the SLA program report gives warnings of "A conversion rate does not exist to convert EUR to GBP for the conversion type UK Spot and conversion date 01-DEC-09 for line -2. Please use th

  • When i exit firefox i have to reset my laptop to start it again

    b4 i reset laptop a message comes up stating its still running wen it not n that i have t reset