Getting the html content before browser displays it

Hi,
I have a nagging problem which i am trying hard to solve.
I have a jsp file which gets hundreds of rows from database. I want to capture the html content before the browser displays that. How can I achieve it. ?
Please tell us the solution as soon as possible. we have stopped the work.
Thanks & Regards,
A S N Murthy
[email protected]
[email protected]

Hi !
continuing with my previous mail...
Is it okay with you if you use save the Data to be rendered in an XML ? (if you just need all the data).
You've written you will have "hundreds of rows from database".
In case you think of saving the data in an XML format, you can have all that data in a structured manner on the server side. And later you could use the XML file in any way you want. i.e. convert it into an html using xalan, etc. or use the XML file to access the data instead of a DB transaction all over again...
I guess this might be a better approach than saving the HTML that will be generated by the JSP.
Anyway, it depends on your requirement.
regards,
Rahul C Tiwary

Similar Messages

  • I cannot get the Adobe Content Viewer to display anything in InDesign CS6 / on a Windows 7 PC.

    I create a scrollable text that is in a text frame using the Folio Overlay with the settings of Vertical Scroll and Use the Document Setting for its position.  When I click on the Preview icon on the Folio Overlay panel, it comes up with the with a popup that says Preview on Desktop and click on it and nothing happens.
    Message was edited by: jammyster

    I reinstalled a download of the update (for the third time) and still it will not display my file in the Content Viewer using the Folio Overlay panel and clicking on the preview button and selected display on the desktop.  I see all the compilations, but when it is done, there is nothing displayed like it never did the complilation.  Do I need to call Adobe tech support and tell them about the bug or give up and start using the Apple Book Authoring software and forget about Adobe because there seems no answer.

  • Get the  html  output  in browser

    Hi Everyone,
    Im using htp.p() and i able to generate html code.But im not getting how to see the
    output through the browser for that html code by compiling/executing the procedure.
    I need your suggestions. If my question is wrong please let me know.
    Thanks,
    MaheshM

    I repeat my question : what is the relation with your request and the Oracle Forms product ?
    I think that you posted in the wrong forum.
    Francois

  • Getting the HTML of a page.

    I wish I could retrieve as a string the HTML content of a page displayed by a webEngine.
    I know this code works:
    webEngine.getPage().getHtml(webEngine.getMainFrame());
    But getPage() and getMainFrame() are not public.
    What is the "official" way to get the HTML content of a page as a string?

    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.layout.VBox;
    import javafx.scene.web.WebView;
    import javafx.stage.Stage;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.ls.DOMImplementationLS;
    import org.w3c.dom.ls.LSSerializer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    // Getting the HTML of a page. "Getting the HTML of a page"
    public class DocumentPrinter extends Application {
      public static final String CONTENT =
          "<dl>\n" +
          "<dt>Coffee</dt>\n" +
          "<dd>- black hot drink</dd>\n" +
          "<dt>Milk</dt>\n" +
          "<dd>- white cold drink</dd>\n" +
          "</dl>";
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage primaryStage) {
        // create view with some content in it.
        final WebView view = new WebView();
        view.getEngine().loadContent(CONTENT);
        view.setPrefSize(200, 100);
        // hold a log the view's document.
        final Label documentLabel = new Label();
        // write the document to the document label
        view.getEngine().documentProperty().addListener(new ChangeListener<Document>() {
          @Override public void changed(ObservableValue<? extends Document> observableValue, Document oldValue, Document webViewDocument) {
            try {
              Node originalRoot = webViewDocument.getDocumentElement();
              // copying the document is necessary in this case because the serializer
              // we are using is not realized by the webview document implementation.
              // if you used a different serialization library, perhaps the copy step would not be required.
              // http://stackoverflow.com/questions/5226852/cloning-dom-document-object
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              DocumentBuilder db = dbf.newDocumentBuilder();
              Document copiedDocument = db.newDocument();
              Node copiedRoot = copiedDocument.importNode(originalRoot, true);
              copiedDocument.appendChild(copiedRoot);
              // weird dom api for serialization.
              // http://stackoverflow.com/questions/1219596/how-to-i-output-org-w3c-dom-element-to-string-format-in-java
              DOMImplementationLS domImplLS = (DOMImplementationLS) copiedDocument.getImplementation();
              LSSerializer serializer = domImplLS.createLSSerializer();
              // update the document label with serialized document.
              documentLabel.setText(serializer.writeToString(copiedRoot));
            } catch (ParserConfigurationException e) {
              e.printStackTrace();
        // layout the scene.
        final VBox layout = new VBox(10);
        layout.setStyle("-fx-padding: 10; -fx-background-color: cornsilk");
        layout.getChildren().addAll(
          new Title("Web View"),          view,
          new Title("Original Content"),  new Label(CONTENT),
          new Title("Rendered Document"), documentLabel
        primaryStage.setScene(new Scene(layout, 450, 450));
        primaryStage.show();
      class Title extends Label {
        Title(String titleString) { super(titleString); setStyle("-fx-font-weight: bold;"); }
    }

  • In formcentral, why does the "proceed to checkout" button not work? on IE I get error " This content cannot be displayed in a frame...

    In formcentral, why does the "proceed to checkout" button not work? on IE I get error " This content cannot be displayed in a frame. To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame ". On Chrome I get nothing but loading.

    Hi,
     This error is generally specific to Internet Explorer and has two possible causes. The most likely explanation is that your browser has unusual browser security settings. I would recommend you try
    resetting your security settings to defaults (varies by version but all essentially the same). You may also have to turn off
    Protected Mode which is enabled by default on some systems. If you’re seeing this error (or a version of it) outside Internet Explorer, you may have a server-level setting that is preventing your content from being framed.
    Reference:https://social.technet.microsoft.com/Forums/exchange/en-US/1460c5a5-6242-4402-9f6b-bc581bf56478/content-cannot-be-displayed-in-a-frame-when-trying-to-add-item?forum=sharepointgeneral
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • How to get the HTML Source code from the active browser ?

    Hi All,
    I need to get the HTML Source code from the active browser (IE). I tried with the below code, but I am not able to get the Source code all the time, with respect to the different applications (http or https) and the user authentication has to be changes in few applications (_I dont know or not able to given that in the below code_). More over there is also a dependence of the URL to get the HTML Source code.
    Therefore what I feel is getting the HTML Source code from the given or active browser will be consistent than the URL. Since the Source code is available in the browser (IE) . Please help me with a sample code to achieve this . . . !
    HTMLDocument doc=(HTMLDocument) kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
    URL url = new URL(strURL);
    Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
    kit.read(HTMLReader, doc, 0);Thanks in advance,
    Regards,
    Jothi Venkatachalam
    Edited by: j0o on May 7, 2009 3:11 AM

    The simple answer is: you don't.
    Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
    You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
    For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols.

  • JEditorPane with text/html content-type still displaying as plain-text?

    Hello all,
    I recently started work on a very basic HTTP GET program that gets the HTML source of a page and, using a JEditorPane, displays the page as normal (i.e. like a browser would).
    Anywhoo, the HTTP GET is fine, and the source is loaded into a String called "html". Then I do this:
    displayArea.createEditorKitForContentType("text/html");
                        displayArea.setText(html);However the content appears in the editor pane as plain-text (i.e. the HTML code appears as-is, not in a 'compiled' form).
    Any ideas why this is?
    Thanks,
    Tristan

    Thanks for the replies, however the setContentType didn't work either. When I changed the code to what you suggested, nothing got inserted into the editor pane at all (i.e. no HTML - nor plain-text?). More of the code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.Socket;
    import java.util.Scanner;
    public class ClassName extends JFrame implements ActionListener
         public JTextField urlIn, pageIn;
         public JButton go;
         public JScrollPane scrollPane;
         public JEditorPane displayArea;
         public JPanel topPanel;
         public String url, page, html;
         public int index;
         public ClassName()
              setSize(1230,680);
              setLayout(new BorderLayout());
              JPanel topPanel = new JPanel();
              topPanel.setLayout(new FlowLayout());
              urlIn = new JTextField(18);
              pageIn = new JTextField(18);
              JButton go = new JButton("Go!");
              topPanel.add(urlIn);
              topPanel.add(pageIn);
              topPanel.add(go);
              add(topPanel, BorderLayout.NORTH);
              displayArea = new JEditorPane();
              displayArea.setEditable(false);
              add(displayArea, BorderLayout.CENTER);
              go.addActionListener(this);
              urlIn.addActionListener(this);
              setVisible(true);
         public static void main(String args[])
              new ClassName();
         public void actionPerformed(ActionEvent e)
              if( e.getActionCommand() == "Go!" )
                   url = urlIn.getText();
                   page = pageIn.getText();
                   if (url != null && page != null )
                        try
                             final int HTTP_PORT = 80;
                             Socket s = new Socket(url, HTTP_PORT);
                             InputStream inStream = s.getInputStream();
                             OutputStream outStream = s.getOutputStream();
                             Scanner in = new Scanner (inStream);
                             PrintWriter out = new PrintWriter(outStream);
                             out.print("GET " + page + " HTTP/1.0\n\n");
                             out.flush();
                             while( in.hasNextLine() )
                                  String input = in.nextLine();
                                  html = html + input;
                             s.close();
                        catch (Exception exception)
                             System.out.println("Error: " + exception);
                        displayArea.setContentType("text/html");
                        displayArea.setText(html);
                        urlIn.setText("");
                        pageIn.setText("");
                 else
                      System.out.println("Please enter something!");
    }Am baffled as to what the problem is? :-(
    Thanks,
    Tristan

  • Getting the document content in a variable??

    Hi,
    How can I get the entire contents of a document into a string variable? I donot
    want to print the contents inline but rather have to get them in a variable. Using
    printDoc or printProperty tag?? I guess I will have to use printDoc but then how
    can I stop the contents from being displayed in the jsp and how can I put them
    in a variable??
    Please help me...
    Thanx.
    Prirua

    You should always double-check code put on the newsgroups, even if it's
    put there by me :)
    It probably should be at the beginning:
    <es:forEachInArray array="<%=docs%>" id="adoc"
    type="com.bea.p13n.content.document.Document">
    <%
         byte[] bytes = adoc.getContentBlock(0L, -1L);
    Notice 'byte[]' instead of 'bytes[]', the type specified as Document
    (Content doesn't have the getContentBlock() method, the sub-interface
    Document does), and the 'L's on the numbers to specify that they are
    longs to help the compiler find the correct method.
    Greg
    Prirua wrote:
    Hi,
    Thanx for your propmt reply. My code looks somethinglike this
    <es:forEachInArray array="<%=docs%>" id="adoc" type="com.bea.p13n.content.Content"
              <%
              bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve all the content
              String enc = adoc.getPropertyAsString(null, "encoding");
              String str = null;
              if (enc != null)
                   str = new String(bytes, 0, bytes.length, enc);
              else // use VM default encoding
                   str = new String(bytes);
              %>
              <li>The document title is: <cm:printProperty id="adoc" name="Title" encode="html"
    />
         </es:forEachInArray>
    But it is giving me these two errors...
    C:\bea\wlportal4.0\applications\portal\MyPortal\WEB-INF\_tmp_war_portalDomain_po
    rtalServer_MyPortal\jsp_servlet\_portlets\__contentq.java:152: cannot resolve
    sy
    mbol
    symbol : class bytes
    location: class jsp_servlet._portlets.__contentq
    bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve
    all the content //[ /portlets/contentQ.jsp; Line: 19]
    ^
    C:\bea\wlportal4.0\applications\portal\MyPortal\WEB-INF\_tmp_war_portalDomain_po
    rtalServer_MyPortal\jsp_servlet\_portlets\__contentq.java:152: cannot resolve
    sy
    mbol
    symbol : method getContentBlock (int,int)
    location: interface com.bea.p13n.content.Content
    bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve
    all the content //[ /portlets/contentQ.jsp; Line: 19]
    ^
    2 errors
    Could you plz specify if I have to include some file or something ?
    Thanx.
    Gregory Smith <[email protected]> wrote:
    You will need to call the getContentBlock() method on the Document
    object to retrieve the bytes of the document's content. Then, you do
    whatever you need to with the bytes. When converting it to a String,
    you
    should be aware of double-byte-character encodings, and should check
    the
    Document's encoding metadata attribute, e.g.:
    <%
    bytes[] bytes = doc.getContentBlock(0, -1); // retrieve all the content
    String enc = doc.getPropertyAsString(null, "encoding");
    String str = null;
    if (enc != null)
    str = new String(bytes, 0, bytes.length, enc);
    else // use VM default encoding
    str = new String(bytes);
    %>
    In 8.1, the new <cm:getProperty> is able to retrieve the BinaryValue
    of
    a binary property of a Node.
    Greg
    Prirua wrote:
    Hi,
    How can I get the entire contents of a document into a string variable?I donot
    want to print the contents inline but rather have to get them in a variable.Using
    printDoc or printProperty tag?? I guess I will have to use printDocbut then how
    can I stop the contents from being displayed in the jsp and how canI put them
    in a variable??
    Please help me...
    Thanx.
    Prirua

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • How can I get the HTML codes in illustrator?

    Hi, I am a graphic designer, and I am getting into the web world, I wanna know how can I get the HTML codes to upload a web design made using Illustrator,...¡?Does any one know?Please let me know...

    everyone here is right, dreamweaver is better and you will need to understand html for this to work. HOWEVER, you can make a functional website using just illustrator and notepad (or text edit if you're on a mac).
    Design your site in illy, slice it up with the slice tool. http://s23.postimg.org/mv311kpp7/test_illy.jpg 
    Save for web and select html and images, you'll get an html file and an images folder. Open the HTML file in your text editing program and it will look like this: http://s10.postimg.org/f32nf6r2h/html_stuff.jpg   you'll have to know HTML codes but you can find tutorials online for most stuff, you'll just have to figure it out. In my fake site, i linked a button to google so i had to add <a href> tags to the code. http://s22.postimg.org/5avpadhch/a_href.jpg  save the html file and open it in your web browser, hopefully not IE. You can't tell in the picture but the middle button actually does link to google. http://s21.postimg.org/qd77slqmf/firefox.jpg

  • How to get the last wbs which is displayed  in transaction code cj03?

    Dear Experts,
       I want to get the last wbs which are displayed in  transaction code cj03, i have written below program,but i found it is incorrect. because the sort of wbs  in cj03 is not equal to table prps. the last wbs in cj03  is not equal to table prps.
    who can tell me how to get last wbs which is displayed in cj03?
      SELECT
         PRPS~STUFE
         PRPS~POSID
         PROJ~POST1
         INTO CORRESPONDING FIELDS OF TABLE WA_PRPS_TEMP FROM PRPS INNER JOIN PROJ ON PROJPSPNR = PRPSPSPHI
         WHERE PROJ~PSPID EQ P_PROJECT.
      WA_TLINE = LINES( WA_PRPS_TEMP ).
      READ TABLE WA_PRPS_TEMP INDEX WA_TLINE.
      IF WA_PRPS_TEMP-POSID = P_lastWBS.
        P_LAST = 1
    endif.
    Best Regards,
    Merry

    Hi Merry  ,
      The WBS elements are stored in the table PRPS , so please try using the conversion exit and use the data in internal format then use it in the IF condition.
    Check the FM CONVERSION_EXIT_ABPSN_INPUT and CONVERSION_EXIT_ABPSN_OUTPUT
    Regards,
    Arun

  • I have connected my new Macbook Air to my existing Samsung large external monitor with a VGA adaptor but I can't get the full mac desktop to display. No icons but then websites are coming up. Help!

    I have connected my new Macbook Air to my existing Samsung large external monitor with a VGA adaptor but I can't get the full mac desktop to display. No icons but then websites are coming up. Help!  Further info:  I am a complete newbie to Mac.  Had three macs prior to 2000 then four PCs.  Just come back and struggling a bit with the unfamiliarity. On my old PC laptop I could simply switch from the laptop screen to the large external monitor (and back)  with the F4 function key.  While I can get the background image from my MBA to display, that's it.  Until I noticed on the far left of the external monitor, the very edge of one of the web pages I was on.  So Idragged it over to display in the centre.  But that's all that's there.  And now I have gone out of those web pages but they are still displaying on the monitor.  There is some wierd disconnect.  I'm sure it is just a setting thing.  Will keep searching for answer but any advice welcome!

    Your dsplay is getting extended onto the external monitor. Chcnage the setting to duplicate it or only display on the external monitor and you should be fine,
    Let me know if this worked for you.

  • Topic area: Apple Mail.  Question:  How do I get the message preview window to display to the right of my list of email messages?

    Topic area: Apple Mail.  Question:  How do I get the message preview window to display to the right of my list of email messages? i.e. to preview whatever message is currently highlighted in the center window list of messages?

    At present there is no preference option available to move the preview
    pane to right side of the mail window.
    Best.

  • Trying to install VM Server and not getting the CD found screen to display

    Trying to install Oracle VM Server from a CDROM:
    1.     Insert the Oracle VM Server CDROM into your CDROM drive.
    2.     Boot the computer with the Oracle VM Server CDROM.
    3.     The Oracle VM Server screen is displayed.
    All that went fine but not getting the CD found screen to display. Instead it says the device wasn't found and shows a list of drivers, none of which seem to match the CD drive. Anyone have any ideas? There is an option to point it to a driver disk, not sure if I need to get the driver from somewhere and do that or not?
    machine is Dell Optiplex 760
    CD RW\DVD RW drive

    Try changing the SATA mode in the BIOS to AHCI.

  • I am trying to get the music content on my Mac onto my iPhone. When I connect the devices, the computer does not seem to recognize the iPhone, i.e., on the open itunes window, the iPhone is not seen as a connected "device".

    I am trying to get the music content in iTunes on my Mac onto my iPhone. When I connect the devices, the computer does not seen to recognize the iPhone. i.e., on the open iTunes window, the iPhone is not seen as a connected "device".

    Hi,
    See Here
    iPhone, iPad, or iPod touch not appearing in iTunes
    From Here
    http://www.apple.com/support/itunes/devices/
    Also...
    Device Not Recognised
    For PC
    http://support.apple.com/kb/TS1538

Maybe you are looking for

  • Can we delete the sales order?

    hi, can we delete the sales order?

  • Enterprise Services without ESR and EHP - is it possible

    Hi All, I am investigating if it is possible to setup Enterprise services without having ESR in our landscape. We also do not have EHP installed in our ERP system. We have SAP ECC 6.0 and PI 7.0. I would like to install separate ES that I would like

  • No apple logo on boot

    Whenever I start up my iMac, instead of getting the apple logo, i get a black background and white text with things the computer is loading, and its the same thing at shutdown. Anyone have any ideas? I just got this thing and already a problem.

  • Hi , what are DDIC Objects ?

    Hi,    I would like to know what are DDIC Objects in ABAP ? .   Bye, Satyanarayana.

  • Optical Illusion....Explain This!

    Greetings All! Here is an optical illusion I would like to hear some opinions about. The photo was taken by myself. It is a picture of one of three legs of a clocktower. The legs are curved down and outwards. The reflection that you are seeing in the