Saving an html page in a blob

Hi, i 've posted this question on some other forums with no luck.
I need to find the simplest way to save a submitted html page(html code along with its values) into a blob so that i can redisplay the page with its values later on(like taking a screen shot). The page is a jsp that uses a bean(i don't know if this would pose a problem).
Thanks for any help

1. Create a data structure that holds
a. the html file
b. a copy of any external resource the page needs (css file, javascript file, images, etc). These resources will have to be discovered by parsing the html.
2. Your HTML data object needs to imlpement Serializable or Extenalizable. (do some reading if you don't know what those are).
3. Set the Blob's data to the serialized HTML data object's data.

Similar Messages

  • File-Save window(saving the html page by clicking a button)

    Hi,
    when I click a button, a window should open which is same as the one which appears when we click File-save.
    This should happen to save the data that is displayed on the internetExplorer, when the user clicks the submit button on his page.(ie,Saving  the html page in his desired location).
    Thanks in advance.

    Refer FileDownload and FileUpload tutorial.
    If the idea is just to save the html page, I am not sure if it is possible.
    If the idea is to save the data in the html page then you can save it as xml format or csv format. Refer to the following tutorials:
    a) FileUpload and FileDownload
    b) Web Dynpro Binary cache
    Regards,
    Subramanian V.

  • Programmatically saving an HTML page

    I have a servlet which forwards parameters to a page, where the processing is done & output displayed in the browser!
    I want to save the output HTML from the servlet itself, without any interaction from the user! How to make this possible?

    I want to save the HTML page on the client side itself! I tried out another way, using the URL class & used its method to save the byte stream as a HTML file. This works alright except that some JavaScript errors are robbing the page of its look & feel! :-(

  • Only non html pages being saved in History; also can't change homepage

    The last time Firefox actually saved an html page in the history was May 16th. Firefox will only save pages that I visit that are non-html pages, a page that ends in .pdf, jpg, .doc, etc.
    I have tried several times messing around with options - picking don't remember history, then restarting and selecting remember history.
    I uninstalled Firefox, but kept personal data. Then I reinstalled. Still didn't work.
    I then used the reset FireFox. It only made things worse. Now I can't change the home page.
    This is Firefox 22 beta on Win 8 Pro 64bit

    Does this only happen when you close and restart Firefox or already during a browsing session?
    In case you are using "Clear history when Firefox closes":
    *do not clear the Browsing History
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

  • Vs 2013 community screws up formatting of html page when saving file

    I have seen other people having this issue with suggestions like 'Formatting and visualizations, tag specific options. However this is not solving my issue
    example
    I type the following code this way
    <asp:Panel ID="Panel1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Days Old " />
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server">
    <asp:Label ID="Label2" runat="server" Text="Days Old " />
    </asp:Panel>
    then when I hit save the code changes to
    <asp:Panel ID="Panel1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Days Old " />
    </asp:Panel><asp:Panel ID="Panel2" runat="server">
    <asp:Label ID="Label2" runat="server" Text="Days Old " />
    </asp:Panel>
    This messes with the outlining and makes it hard to see where controls like Panel2 is in the code.
    I am using a fresh install of visual studio community 2013 on a fresh install of windows 8.1 so this is not an issue with my istallation.
    I have tried setting tag Specific options with no change
    It doesn't do this every time or just on asp:panels
    I have tried adding line breaks and spaces etc. this doesn't help either.
    is this just a bug in visual studio or is there a general setting out of wack. I didn't have this problem with vs express for web 2012. but I did have it with vs express for web 2013 and community 2013

    Hi PBPuddin,
    Thank you for posting in MSDN forum.
    Based on your issue, I tried to add this code as you said into a html page and then I saved the code. I found that the code formatting of the html page did not occur like you said that in VS2013 Community.
    So to check if this issue is related to the VS2013 Community IDE, I suggest you could try to copy the  same version of the VS2013 Community setup file on other machine and then install it check this issue again.
    (1) If you still get the issue, I assume that the issue maybe related to this VS2013 Community setup file, so please download it from Microsoft official website and then install it again.
    https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx
    (2) If you did not get same issue, I suggest you could try the following suggestion to check the issue.
    (2.1) please try to open your VS in safe mode and then check if you install some add-ins in the VS IDE.
    https://msdn.microsoft.com/en-us/library/ms241278.aspx?f=255&MSPPError=-2147217396
    Or you could try to check if you install some third-party tool/ software on your machine.
    Hope it help you!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Display images stored in BLOB in html pages via JSP

    Hello,
    My images are stored in BLOB column of other base than portal.
    in JSP i have to display them in html pages.
    anybody have already did the same thing ?

    teggvb6,
    I believe you should be able to get it to work by doing the grants to the user specified in the DAD (i.e. the user that is logging into Oracle) rather than PUBLIC (someone else may correct me on this?).
    If you're concerned that the procedure could be called by others then I guess you could do some sanity checking within the procedure, for example checking v('APP_USER') or maybe v('SESSION') or perhaps do something clear with the REFERER http header? I haven't thought this through yet but I'm pretty sure you should be able to tie it down a bit more.

  • Viewing HTML page saved  on the server from the browser

    Hi all
    In my application i am having some HTML pages saved on the server. I had given an option to the user to view the HTML page from my application. behind the scene what i am doing is that the view request will get handled by a servlet and from that servlet iam locating the HTML page on the server directory and sending the HTML page to browser by using the Servlet OutputStream. The HTML page is shown on the browser but the attached images are not shown. The images are also there in the server directory and are refered in the HTML file correctly. When i directly open the HTML file then the images are shown correctly.
    Can anyone suggest wat's wrong there.
    The code i m using is
    ServletOutputStream out=response.getOutputStream();
                        if(format.equalsIgnoreCase("pdf"))
                             logger.info("Seleted format is pdf..\n");
                             response.setContentType("application/pdf");
                        else
                             logger.info("Seleted format is html..\n");
                             response.setContentType("text/html");
    String file = ReportingConstants.URL_GENERATEDREPORTS+reportPath+itemName;
    // file : HTML file absolute path as string.
                        URL url=new URL(file);                    
                        BufferedInputStream bis=new BufferedInputStream(url.openStream());
                        BufferedOutputStream bos=new BufferedOutputStream(out);
                        byte[] buff = new byte[2048];
                        int bytesRead;
                        while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
                             bos.write(buff, 0, bytesRead);
                             bos.flush();
                        }

    You have to undertsand how the browser handles images and other resources in a HTML page. In the HTML there is an image tag that has a url to an image which can be a reletive url or an absolute url (starts with a "/").
    If the url is a relative url the browser interprets the url as being relative to the url currently displayed in the address field discarding the last element of the url . So if the url in the address bar is http://www.myserver.com/myapp/mypage.html and the relative url is images/myimage.jpg, the browser will submit a request to the server for http://www.myserver.com/myapp/images/myimage.jpg
    Now let's say that you are call mypage.html from a servlet that has the url http://www.myserver.com/myapp/servlets/myservlet. Then when the browser tries to retrieve myimage.jpg it will use the url http://www.myserver.com/myapp/servlets/myservlet/images/myimage.jpg and since this is incorrect it will not be able to display the images.
    One solution to this is to change all of the image urls to absolute urls. That is the start with a slash where the slash represents the start of the url after the application domain name. For example you used an absolute url for myimage.jpg it would look like /images.myimage.jpg and when accessing the page through the servlet url (http://www.myserver.com/myapp/servlets/myservlet) the browser will discard everything after http://www.myserver.com/myapp and look for the image at http://www.myserver.com/myapp/images/myimage.jpg which is the correct url.
    A second solution is to use the HTML BASE tag which tells the browser not to interpret the image tag urls (and other resourses) using the current url in the address bar but to use the url supplied in the HTML BASE tag. The browser will still perform the same process for relative urls but now relative to the BASE tag url. Since the BASE tag url will be the same every time the page is accesssed the images should be correctly accessed no matter how the page is accessed (eg directly, using RequestDistpatcher or via your servlet)

  • Html page saving as template

    My index page (a .html page) wants to save as a template... I
    do not want it saved as a template, but the only way I can
    apparently save it is to do a "save as" rather than just save.....
    If I try to just "save" it goes to the "save as template" screen.
    Help!

    Huh? You certainly do not need to go to save as everytime.
    And what do you
    mean, anyhow?
    Besides, the suggestion you make here will destroy the link
    between this
    template page and its child pages. I think you are confused
    big time.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "phenixwars" <[email protected]> wrote in
    message
    news:g7ctu8$cbd$[email protected]..
    > hi. same thing happened to me recently. when you're
    learning you're
    > learning
    > right? anyway, just go into the code and delete all the
    areas that say
    > <!--TemplateBeginEditable or anything that says
    template anything in your
    > code
    > and then you should be able to save it without having to
    go to save as
    > everytime.
    >
    > hope it works
    >

  • Generating PDF-files from HTML-page saved as Unicode?

    I have followed this Quick Start on how to generate a PDF-file from HTML using web services in .NET: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000093.html
    It works just fine when the html-page is saved as ANSI, but when it's saved as UNICODE I get problem. The code runs without errors but the PFD looks really strange. Any suggestions on how to solve this? I really need to use UNICODE as my application needs to handle different languages (including for example Chinese).

    I found out that UTF-8 worked as well so the problem is solved. :-)

  • Question on saving html page into excel

    hi all,
    i have one problem. Is there any ways that i can save a html page into excel??? that is to save the data displayed on the html page into excel spreadsheet.
    thanks for your advice.

    Even if you need to click a button to parse the page to a parser, you still need to transmit the page back to the server to process, unless you want the client to do it, in which case he/she will have to need a program.
    Given by the views floating around in this forum, the idea is that doing a re-query is as costly if not less costly than re-submitting the html page. By relegating to the back-end processing of data using the database, you can ensure the data is up-to-date and you can control the programs executing. That is, you are not worried about user submitting garbage html page for you to process.
    If you data size is not large, there is always the session memory to use but it's not really wise as your server's memory is much costlier than network bandwidth. It's the whole server becomes slow versus your DB connection slow.
    If you really need to use the re-submitting of your html page back to the server to process, you can always use hidden form values in html to post your data back. However, I can't remember whether there's a limit to the amount of data you can post. Think it's 1024K or something.

  • Build html page with database images

    Hello,
    I have to build html pages in jsp that display images (JPEG, GIF) who are stored in database BLOB fields.
    Is anybody have sample to do this ?
    Thanks

    > Please help me... I need it!
    The answer that you do not want to hear is - spend some time
    learning HTML
    and CSS if you want to do things like this. It's true. DW
    will expect this
    knowledge on your part. Without it you will encounter
    continuous mysteries
    in your pages.
    > I have designed my page in Photoshop and have saved it
    as a HTML with
    > images.
    This is the wrong way to start. Here's a better plan....
    http://apptools.com/examples/pagelayout101.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Noreago1979" <[email protected]> wrote in
    message
    news:g1vhsa$lg6$[email protected]..
    > Is there a way to anchor a layer to a specific point on
    a HTML page?
    >
    > I have designed my page in Photoshop and have saved it
    as a HTML with
    > images.
    > I then opened it in Dreamweaver and alligned my designed
    page centre so
    > that it
    > is always center to the opened explorer window. The
    problem I am having is
    > that
    > I want to place my text layers in the document and have
    them anchor or
    > stay to
    > the exact spot i placed them on the page i designed and
    now have opened in
    > Dreamweaver. When i test it or open it up in the
    explorer page the text
    > layer
    > shifts differently than the the designed page i created
    in photoshop. I
    > would
    > like them to move together at the same rate.
    >
    > How can I make this work.... I have tried everything
    that i could think
    > of.
    >
    > Please help me... I need it!
    >
    > Thanks
    >

  • How to display a text file in a html page?

    I have written a servlet that executes a batch file whose output is saved to a txt file. I am attempting to display content of the text file as a html page from the servlet but am struggling I have attempted to read the file and output it as shown below but it is not displaying the correct data
    Appreciate some help
    Thanks in advance
    Amjad
    Runtime r = Runtime.getRuntime();
    Process p = r.exec("C:\\Condor\\test\\QueStatus.bat");
    PrintWriter out;
    String title = "Que Status";
    response.setContentType("text/html");
    out = response.getWriter();
    FileReader fr = new FileReader ("C:\\Condor\\test\\output.txt");
    for (int chr = fr.read(); chr != -1; chr = fr.read()){
         out.print(chr);
    }

    Couple of things. First you should search the forums for how to properly exec a dos batch file. There are some problems you may run into especially with io. I suspect you may not actually be running that batch file at all.
    I would test outputing a text file separately from execing the batch file.
    Here is some code so you don't have to output 1 char at a time. Setting the content length and closing the output stream might help.
    File downloadFile = new File("c:\\blah\\blah\\blah");
    response.setContentLength((int)downloadFile.length());
    response.setContentType("text/html");
    ServletOutputStream out = response.getOutputStream();
    FileInputStream fis = new FileInputStream(downloadFile);
    byte[] buffer = new byte[1024];
    int bytesRead;
    while ((bytesRead = fis.read(buffer)) != -1) {
    out.write(buffer, 0, bytesRead);
    fis.close();
    out.close();

  • How do I add to the HTML page containing an fla?

    Hi,
    My site has Flash Video that plays back in a Flash movie
    file.
    I want to put html text on the html page containing the Flash
    movie so that if a viewer doesn't have Flash, they can see a plain
    text link that sends them to a page with a Windows Media Player.
    When I attempt to add text to the html page containing the
    Flash movie, the text doesn't appear and my page changes background
    color.
    Where in the source code should I be adding my html text?
    Please indicate the insertion point below.
    Source code below or visit
    http://www.ocatillopictures.com/OcatilloFrames/Animation.html
    Thanks
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Janos-FlashPlayer</title>
    <script language="javascript">AC_FL_RunContent =
    0;</script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>
    </head>
    <body bgcolor="#100068">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    <p align="center"><font face="Wingdings 3" size="16"
    color="#80dbf9" letterSpacing="0.000000" kerning="1"><a
    href="
    http://www.ocatillopictures.com/FinalPages/Animation.html#Janos
    Video Anchor" target =
    "_self"><b>t</b></a><font
    face="Arial"><a href="
    http://www.ocatillopictures.com/FinalPages/Animation.html#Janos
    Video Anchor" target = "_self"><b>Return to
    Menu</b></a></font></font></p>
    <p align="center"><font face="Arial" size="16"
    color="#80dbf9" letterSpacing="0.000000" kerning="1"><a
    href="
    http://www.ocatillopictures.com/movie-pg/Janos-movie.html"
    target = "_self"><b>View Windows
    Media</b></a><font face="Wingdings 3"><a
    href="
    http://www.ocatillopictures.com/movie-pg/Janos-movie.html"
    target = "_self"><b>u</b></a><font
    face="Arial"><b>
    </b></font></font></font></p>
    -->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    AC_FL_RunContent(
    'codebase', '
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    'width', '700',
    'height', '500',
    'src', 'Janos-FlashPlayer',
    'quality', 'high',
    'pluginspage', '
    http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'Janos-FlashPlayer',
    'bgcolor', '#100068',
    'name', 'Janos-FlashPlayer',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'Janos-FlashPlayer',
    'salign', ''
    ); //end AC code
    </script>
    <noscript>
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
    width="700" height="500" id="Janos-FlashPlayer" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="Janos-FlashPlayer.swf"
    /><param name="quality" value="high" /><param
    name="bgcolor" value="#100068" /> <embed
    src="Janos-FlashPlayer.swf" quality="high" bgcolor="#100068"
    width="700" height="500" name="Janos-FlashPlayer" align="middle"
    allowScriptAccess="sameDomain" allowFullScreen="false"
    type="application/x-shockwave-flash" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>
    </noscript>
    </body>
    </html>

    You have the text commented out. Remove the "<!--" before
    your text and the "-->" after the text and it will show.

  • Problems with saving a html webpage under windows 7

    Hello people,
    Ik have the next problem. When I an webpage witch I have made for instanse webpage.html open and I change something in it en I wanna save this changes in my webpage I get the next message (maybe the translation is not the right one) An error occurred while accessing E:\users\name\websites\MFC936D.tmp.
    This tmp file has every time a different name. The site is not saved (webpage.html) but the html page disapeares when I click the eroor message away. And the tmp file displays in the map where the files are being saved.
    My dreamweaver cs4 runs under windows 7
    I hope someone can help me.
    Thanks a lot.
    Bart

    E: is another partition were I save my data too.
    The file is maybe read only you say. But 2 things sometimes it saves right after I have tried it a few times. And second I have started dreamweaver with administration rights, so you think he has all the rights. But the sme thng happened.

  • How to send html page in outlook wihtout gibberish

    i have html page that i tried to send in outlook with send web page by email
    the problem is it add the following thing before the html:
    ן»¿
    the questions are:
    from where does it come from? and how to fixed it so it does not show?

    thank you for the answer but saving it as ansi or unicode make things worse and in that encoding
    it is not possible to see the page
    the page is mainly photos some text and links
    is there any other
    possibility that cause this or it is only encoding of the page? 

Maybe you are looking for

  • BI FI and Cost Centre Reconciliation

    Hi I have a requriement to create a GL reconciliation report between Finance and Cost centre data, i have a multi sitting over the relevant cubes and the data is coming through. The report is as follows                  |_FI Total__|___Cost Centre To

  • Filter values not showing on iPad

    Hi, I have a BW query based universe (UNV) that is published to iPad. The WebI report runs fine in BI Launchpad. However, when I open same report on iPad, the prompt values are not show (I see only blank Blank Blank) and report is not executed. BW se

  • How do I increase the size of fonts in Yosemite?

    Hey all, recently I've been struggling to read the system fonts on Yosemite. I need to squint in order to see texts. For example, the font at the top left of the screen where the 'Apple logo' is it's hard for me to read the text. I've got a 21.5inch

  • HT1311 how to change my apple id in iTunes in my phone

    I have change my apple id in my phone (4S). but i could not update apps in apps stroe. It always ask for previous apple id password. what to do..

  • JSP Error Related Oracle Apps

    Once I logon with the correct userid and password,I have been interrupted to move any further and following error msg showing: JSP Error Request URI:/OA_HTML/fndvald.jsp Exception: java.lang.NoClassDefFoundError Please help me out of the problem at t