Streaming HTML Content

Good afternoon - I'm stuck here, and would appreciate all the help you could give.
I'm looking for a solution in flex 4 in which I can keep a 'persistent' HTTP connection, and 'react' or toss an event for each line of text that comes out of the http connection.
I've cometd (which I can't get to work w/ 2 different servers, the documentation sucks)... I've tried httpservice, but it only responds when the connection is terminated and the 'whole' document is retrieved..
Anyone have any thoughts?

URLStream?
C

Similar Messages

  • Opening a byte stream of HTML content in the default browser

    Hi,
    I have a ByteArrayOutputStream which holds HTML content. Can anybody tell me how to open it in the default browser with out saving the content to a file?
    Thanks and regards
    Unni

    Weeeeeelllll. You could implement your own mini http server, then launch the browser pointing to localhost....
    Some browsers have automation interfaces that you could technically use to do something like this, but you are way outside the realm of Java land at that point.
    If your code is running as an Applet, there may be some sort of interface that allows you to do this (it's been so long since I messed with applets that I can't really say - my initial inclination is to think "probably not", as this could violate the security sandbox... but who knows).
    - K

  • Showing HTML content in jspx page

    Hi,
    We have stored text/html email messages in database and we want to display this on our page.
    I tried with af:richTextEditor its not showing actual space & font. Few extra line breaks are added.
    I tried af:outputText with escape=false it looks perfect. But all the menu items, command links, tab header label are started showing underlines and the UI looks odd. When I check the documentation it says
    "In addition, nearly all attributes are ignored when "escape" is set to false"
    I believe this is the reason the UI is showing odd.
    All I need is just to show a html content inside a panelGroupLayout. Any suggestions?
    Thiru

    Hi,
    here's what I think works best:
    1. add an ADF Faces inlineFrame component to the page
    2. Have the inlineFrame source property pointing to a servlet that reads and streams the HTML from the database as an HTML document
    Frank

  • Portal Page showing HTML content

    Using standard Portal components, is there a way to create a
    portal page with 1) left hand set of links to html pages. 2) on
    the right side is a portlet showing the html page. This is what
    99% of websites do.
    The portal seems to have 1) single HTML portlet I would need a
    portlet and a new Portal page for each HTML.
    2) content areas with their own funky way of showing content
    i am looking for the simple web way to implement. I have though
    of writing a portlet that you feed it a parameter aka the file
    name of the HTML content that should appear.
    HELP!

    Hi,
    here's what I think works best:
    1. add an ADF Faces inlineFrame component to the page
    2. Have the inlineFrame source property pointing to a servlet that reads and streams the HTML from the database as an HTML document
    Frank

  • Junk characters display while using multipart with html content in Javamail

    Hi All,
    I have used Java mail API to send mail with attachment. To enable to attachment in mail and to do content formatting i have used multipart and html content type together.
    My web application runs on apache tomcat 5.5 in MAC server. Java version is 1.5.
    The Function which i have used for sending mail with attachment is as follows:
    public void sendmailAttached(String to,String from,String host,boolean debug,String mailContent,String mailSubject,String cc,String attachFiles)
              String mailarray[]=to.split(";");
              Properties props = new Properties();
              //props.put("mail.smtp.port","425");
              props.setProperty("mail.smtp.host", host);
              if (debug) props.setProperty("mail.debug", ""+debug);
              Session session = Session.getInstance(props, null);
              session.setDebug(debug);
              try {
                   Message msg = new MimeMessage(session);
                  msg.setFrom(new InternetAddress(from));
                 javax.mail.internet.InternetAddress[] toAddress=new javax.mail.internet.InternetAddress[mailarray.length];
                 for (int i=0;i<mailarray.length ;i++ )
                                            toAddress=new javax.mail.internet.InternetAddress(mailarray[i]);
              msg.setRecipients(Message.RecipientType.TO, toAddress);
              msg.setSubject(mailSubject);
              try{
                        String ccaray =cc;                    
                        String mailarray1[]=ccaray.split(";");
                        javax.mail.internet.InternetAddress[] CCAddress=new javax.mail.internet.InternetAddress[mailarray1.length];
         for (int i=0;i<mailarray1.length ;i++ )
         CCAddress[i]=new javax.mail.internet.InternetAddress(mailarray1[i]);
              msg.setRecipients(Message.RecipientType.CC,CCAddress);
              }catch(Exception ss)
                        System.out.println("CC mail exception is ====>"+ ss.getMessage());     
              msg.setSentDate(new java.util.Date());
              Multipart multipart = new MimeMultipart("related");
              BodyPart messageBodyPart = new MimeBodyPart();
              messageBodyPart.setContent(mailContent, "text/html");
              multipart.addBodyPart(messageBodyPart);
                   String fileName = attachFiles.substring(attachFiles.lastIndexOf("/")+1,attachFiles.length());
                   if(!fileName.equals(""))
                        messageBodyPart = new MimeBodyPart();
              DataSource source = new FileDataSource(attachFiles);
              messageBodyPart.setDataHandler(new DataHandler(source));
              messageBodyPart.setFileName(fileName);
              multipart.addBodyPart(messageBodyPart);
              msg.setContent(multipart);
              Transport.send( msg );
              catch(MessagingException mex)
                   Exception ex = mex;
                   if (ex instanceof SendFailedException)
                   SendFailedException sfex = (SendFailedException)ex;
    Address[] invalid = sfex.getInvalidAddresses();
    if (invalid != null) {
    if (invalid != null) {
    for (int i = 0; i < invalid.length; i++)
    System.out.println("Invalid Addresss --------> " + invalid[i]);
    try
         Message msg = new MimeMessage(session);
              msg.setFrom(new InternetAddress(from));
              Multipart multipart = new MimeMultipart("related");
         BodyPart messageBodyPart = new MimeBodyPart();      
         messageBodyPart.setContent(mailContent, "text/html");
    multipart.addBodyPart(messageBodyPart);
    Address[] validUnsent = sfex.getValidUnsentAddresses();
    javax.mail.internet.InternetAddress[] toAddress=new javax.mail.internet.InternetAddress[validUnsent.length];                         
    if (validUnsent != null) {
    for (int i = 0; i < validUnsent.length; i++)
    System.out.println("Valid Address ------>"+validUnsent[i]);
    String test = validUnsent[i]+"";
    toAddress[i]=new javax.mail.internet.InternetAddress(test);
    msg.setRecipients(Message.RecipientType.TO, toAddress);
    msg.setSubject(mailSubject);
    String fileName = attachFiles.substring(attachFiles.lastIndexOf("/")+1,attachFiles.length());
                   if(!fileName.equals(""))
                        messageBodyPart = new MimeBodyPart();
              DataSource source = new FileDataSource(attachFiles);
              messageBodyPart.setDataHandler(new DataHandler(source));
              messageBodyPart.setFileName(fileName);
              multipart.addBodyPart(messageBodyPart);
    msg.setContent(multipart);
    Transport.send( msg );
    catch(Exception e)
         System.out.println("Mail Not Send");
              else
                        System.out.println("Mail Server Not Connectd ");
    This code is working properly and i am able to send mail with attachment and html formatted content without any problem. But console of server is filled up with too much junk characters because of which the catalina.out file of tomcat server is becoming fully filled.
    Sample cosnole display with  junk characters are as follows:
    Subject: HBSP - DRUCKER - QC - CH16 - QC  R2 Completed
    MIME-Version: 1.0
    Content-Type: multipart/related;
         boundary="----=_Part_34_15681668.1247471518887"
    ------=_Part_34_15681668.1247471518887
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    <b>Hi,</b><br><br>     Chapter CH16 in the project DRUCKER is Completed . <br><br>     <b>Comments :</b> Qc Accepted.<br><br> <b><i>Thanks,<br>ANTONY.</i></b>
    ------=_Part_34_15681668.1247471518887
    Content-Type: application/octet-stream; name=9420317_CH06_p084-119.pdf.zip
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename=9420317_CH06_p084-119.pdf.zip
    UEsDBBQAAAAIAMOz6TqHaQ4BUtXhAGzP8QAZAAAAOTQyMDMxN19DSDA2X3AwODQtMTE5LnBkZsQ7
    CTxUX9tCUpIWEomxpoWZuTN3FmvW7P9skaUajCXGiCHSYiuKFrIvlWStROSvaBEtiIpkK5WlUipa
    ZKl898wYRP/37fve7/e69TjnPuc5z3LOuc95zjP3ym7S1lXAKuL5ZTu7HjTyL8ATiCgMiu6wA6Wi
    gjZy86RSvN12U51QWLQRCguT8ESISED/hcITMWgdFJZIgPAwBm2CwhHQFqAdRySRcWg9lC2KBBNQ
    WAIRZ6+mxk/1dEI48qNYF7+/N9WZHwiCSPyY8QtLQDFLlCf/AhYGgiHyDBwBIs7EETEzcCR4Bg6H
    IZBn4LBE7AwcNBOHJ87EwWQ8aTqOgIWJM3C4mX2JMH6GLiQiHjMDR8bD03BYDBYizcDh8LjpOCyM
    xczAETH4mbgZOmNhmDCDHwE7Qz+IhMNO54eHCKTp/GAcboYuBBJMmi6DSIZxU+lYF7KSJnEMb4qb
    B9WbH1md5sjCROHJMHqTN9VvfPGRcGgzOp2BwhOQMUKZofU9nenIDYF1o22rgtXU1EWGRgsia2vp
    Like this display of junk characters are filling up multiple pages of console file.
    Can any one suggest me how to overcome this problem?
    Many thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    There is no "sendmail" method in the JavaMail API.
    The debug flag is set using the Session.setDebug method, or by setting the Session property "mail.debug".
    If you're using someone else's helper classes with JavaMail, they may provide another way to set it.

  • Report and HTML content

    Hi,
    I have a lot of HTML formatted text stored in a blob field.
    The HTML code has some <b>a href</b> tags (something like this: a href = "53127" or a href = "53127_1" or a href = "53127_2" ...).
    I created a appIication using APEX (10gXE) and I can display the HTML content in my report but the links do not work.
    I need something like this:
    http://127.0.0.1:8080/apex/f?p=103:4:SESSION_ID::NO:RP,:P4_CODACT:53127
    instead of:
    http://127.0.0.1:8080/apex/53127
    I am tryng to migrate a web application created in Java using servlets. In Java the solution was the use of regular expressions to convert the stored <b>a href</b> tag to a valid url.
    Here is my Java code:
    -- some code
            s=processHtmlTags(s,
                "<a href = \"([0-9_].*?)\">",
                "<a href=\"" + dm.response.encodeURL("ResultDetail") + "?codact=",
                "\">");-- rest of servlet
    -- the processHtmlTags definition
        public String processHtmlTags(String INPUT, String REGEX, String strHead, String strTail) {
            int cnt=0;
            String strOutput;       
            Pattern pattern;
            Vector group0 = new Vector(5);
            Vector group1 = new Vector(5);       
            try {
                pattern = java.util.regex.Pattern.compile(REGEX);
                matcher = pattern.matcher(INPUT);
            catch(java.util.regex.PatternSyntaxException pse) {
            while (matcher.find()) {           
                group0.addElement(matcher.group(0));
                group1.addElement(matcher.group(1));
                cnt++;
            strOutput=INPUT;
            for(int i=0; i<group0.size(); i++) {           
                String s0=(String)group0.elementAt(i);
                String s1=(String)group1.elementAt(i);
                strOutput=strOutput.replaceAll(s0,strHead+strAnchor(s1)+strTail);           
            return strOutput;
        }The question is can I do the same thing using APEX?
    Thanks,
    Catalin Florean.

    Use the REGEXP_REPLACE function available in 10g.
    That also implies switching from an HTML region to a PL/SQL region.

  • SSRS 2008 R2 report does not print the page header for a html content displaying on multiple pages

    Hi
    I need to display the html content from the database. The html content are quite long and can have content of 3-5 pages. Issue I  am facing is f the record has html content of 3-5 pages, then it does not print the page header (which is a separate tablix) on
    second page onwards.
    Nikesh Shah
    Nikesh Shah

    Hi Nikesh,
    According to your description, I’m not sure the meaning of Page header in your scenario. In Reporting Services, a page header that run along the top of each page, respectively. Headers can contain static text, images, lines, rectangles, borders, background
    color, background images, and expressions. But we couldn’t add tablix in the page header.
    If you are saying report header, a report header consists of the report items that are placed at the top of the report body on the report design surface. They appear only once as the first content in the report. So it cannot repeat in other pages.
    If you are saying tablix header, freezing column headers are different in table and matrix. For more details, please refer to the following thread:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c8ddc1af-1bdf-4e72-8aab-0353c7cc848a/ssrs-report-freezing-row-and-column-while-scrolling-issue?forum=sqlreportingservices
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Print html content of an JEditorPane

    Hello!
    I have an JEditorPane with some HTML Content displayed (as it is displayed in a browser).
    Now i want to sent this content to a printer.
    After some search i found the DocumentRenderer class from this link:
    http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    It may be trivial, but i don't know how to create a HTMLDocument Object from my JEditorPane (and its contents).
    Maybe somebody can help me out with this.
    my code so far:
    DocumentRenderer renderer = new DocumentRenderer();
    HTMLDocument doc = new HTMLDocument();
    //At this point i don't  know how to get my JEditorPane/it's contents "into" the HTMLDocument Object
    renderer.setDocument(doc);
    renderer.print(doc);                               Many thanks in advance for help!

    find it out by myself.
    HTMLDocument doc = (HTMLDocument)myJEditorPane.getDocument();But now i ran in another problem:
    Checkboxes are not displayed when i print this content.
    Is it possible to solve this problem?

  • SSRS 2008 R2 report prints empty spaces for html content till end of page

    Hi
    I need to display records containing long html content say each record of different size ranging from 5 lines to 3-5 pages.
    Issue observed is:
    When a record complete is printing say half the page and subsequent record is bigger then half a page, the subsequent record is printed on the next page rather than continue immediately after the previous record is completed.
    Is their any property or any other solution to resolve the issue. Print on next page is not set.
    Nikesh Shah

    Hi Nikesh,
    As per my understanding, I think the issue is caused by the blank space in the report body. In order to get rid of the blank space when print the report, please refer to the following steps:
    Click on Report > Report Properties > Layout tab
    Make a note of the values for Page width, Left margin, Right margin
    Close and go back to the design surface
    In the Properties window, select Body
    Click the + symbol to expand the Size node
    Make a note of the value for Width
    Please check the Page Break settings on all your report items and make sure the Body Width + Left margin + Right margin less than or equal to Page width, just like the equalities below:
    (Body Width + Left margin + Right margin) <= (Page width)
    If there are any other questions, please feel free to ask.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • HTML Content not displayed correctly in UWL

    Hi all,
    I have setup UWL to connect to SRM 5.0 system. I have no problem retrieving alerts from the backend. However, alerts with HTML content are not displayed correctly in the UWL. Instead of parsing the HTML content, the html tags are displayed instead.
    Am I missing some configurations here?
    Thanks in advance.

    Hi Benny;
    Please see:
    My Oracle Support FAQ [ID 747242.5] << What are the browser requirements for accessing My Oracle Support?
    If you have still problem you can go wiht SR
    Regard
    Helios

  • HTML Content in Email Notifications

    Hi
    I was wondering if HTML content is supported in BPM Email notifications. The html code in the BPM UI task email notification is coming as plain HTML in the email, can you please let me know if there is any flag that needs to be turned on to process the HTML code before the email is sent out?
    Thanks
    Sasi

    i think standard notification doesn't support this.

  • Best practice for sharing html content on different group spaces?

    How can html content be shared between several group spaces?
    One way I have found is to add a html doc to ucm and then to add this doc as a iframe to a page.
    Are there other ways, like adding on one group space page a html layout element and then to view this content in a different space. How could this be done, with an expression language reference?
    Has someone experience in presenting the same html content on different spaces and can share how he does it. Any ideas are welcome.
    Thanks,
    Max

    Hey Max,
    Check out our technical whitepaper on Integrating ECM with Portal Technologies.
    Our "Fishbowl Portlets" allow you to share any content - HTML, WYSIWYG user generated content, documents etc - in multiple contexts (portlets, web apps, etc).
    This is one of the things that we showcased as the recent Collaborate conference in Vegas - WebCenter framework, UCM and the portlets surfacing the same items in different contexts - all personalization aware, configurable and end user/super user editable.
    The white paper can be found here:
    http://www.fishbowlsolutions.com/StellentSolutions/ContentManagementResources/index.htm
    A blog post on it can be found here:
    http://cfour.fishbowlsolutions.com/2010/03/10/fishbowl-portlets-followup-cis-and-content-consumption-options/
    warmly,
    Billy Cripe
    Fishbowl Solutions

  • Hi when I stream video content to my Tv using Apple from my Ipad3 I find the Ipad goes to sleep after 2/3 minutes and disconects, the only way I have found to stop this is to continually tap the Ipad screen but there has to be a simpler method/ any help

    Hi when I stream video content to my Tv using Apple tv from my Ipad3 I find the Ipad goes to sleep after 2/3 minutes and disconects, the only way I have found to stop this is to continually tap the Ipad screen but there has to be a simpler method/ any help would be most welcome.

    Welcome to the Apple Community.
    Contact the developer of the Air Video app.

  • How to attach HTML content to DMS Document?

    Hello,
    I have a requirement in which I have to make a HTML file which contains the current Dispaly on screen, I have to attach this HTML file inside the DMS document.
    For this I am doing following steps.
    1 ) FM SAVE_LIST
    2) FM WWW_HTML_FROM_LISTOBJECT, form this FM I am getting the Internal table which is containing the HTML content.
             a) I am converting this internal table content ot first in XSTRING using FM SCMS_TEXT_TO_XSTRING
             b) And XSTRING to Binary format.
    3) After this I am creating a DMS cocument using FM CVAPI_DOC_CREATE
    3) After DMS document creation I am using FM CVAPI_DOC_CHECKIN to attach HTML file content to this DMS Document.
    Everthing seems to be ok, but when I am using CV03N to view the document, its showing the HTML file bu not showing the original content(HTML)
    Please help to find the problem, Is there any other way from which I could CHECKIN HTML content directly inside DMS document in HTML form without converting it to binary.

    HI,
    I have not understood the requirement.
    As far as I know, HTML need not to be checked in.
    Refer also link below
    Re: some questions on SAP DMS
    May be useful in choice of FM.
    Regards
    Nitin

  • HTML content with images and links blocked

    Hello,
    I very much need some help here because my company needs to send out newsletters to our clients in HTML format soon and so far the email with HTML content is being blocked as spam while text content works fine. Specifically, whenever I add a link or an image in HTML content, the email doesn't go through. I tried sending in multipart format but it is also not sending HTML with images and links. Here is my attempt:
                                    props.setProperty("mail.transport.protocol", "smtp");
                                     props.setProperty("mail.host", "mail.server.com");
                                     props.setProperty("mail.user", "joeuser");
                                     Session mailSession = Session.getDefaultInstance(props, null);
                                     mailSession.setDebug(true);
                                     Transport transport = mailSession.getTransport();
                                     MimeMultipart mp = new MimeMultipart("alternative");
                                     MimeBodyPart htmlPart = new MimeBodyPart();
                                     MimeBodyPart textPart = new MimeBodyPart();
                                     textPart.setText("Just to make it multipart");
                                     htmlPart.setHeader("MIME-Version", "1.0");
                                     htmlPart.setHeader("Content-Type", htmlPart.getContentType());
                                     htmlPart.setContent(strHtmlMessage, "text/html");
                                     mp.addBodyPart(textPart);
                                     mp.addBodyPart(htmlPart);
                                     MimeMessage message = new MimeMessage(mailSession);
                                     message.setHeader("MIME-Version", "1.0");
                                     message.setHeader("Content-Type", mp.getContentType());
                                     message.setHeader("X-Mailer", "Recommend-It Mailer V2.03c02");
                                     message.setContent(mp);
                                     message.setSubject(strSubject);
                                     message.setFrom(new InternetAddress("[email protected]"));
                                     message.addRecipient(Message.RecipientType.TO,
                                             new InternetAddress("[email protected]"));
                                             transport.connect();
                                             transport.sendMessage(message,
                                             message.getRecipients(Message.RecipientType.TO));
                                     transport.close();This code is one of my numerous attempts to make HTML send images and links. Please, let me know if there is a workaround way to make JavaMail send HTML with links and images in the message body. Your help will be greatly appreciated.

    The JavaMail FAQ has information on creating HTML messages, including
    messages with both plain text and HTML. Did you find it?
    BTW, your code has many unnecessary statements, such as setting
    the Mime-Version header, which JavaMail will do for you, and setting
    the Content-Type header, which JavaMail does as a side-effect of the
    setContent or setText calls.
    Other than that, it looks like your code should be correctly creating a
    multipart/alternative message. If the recipient is still rejecting it you
    need to figure out what it is about the message that makes the recipient
    think it's spam. Can you send a similar message using another mailer?
    Can you send the message to a different recipient?

Maybe you are looking for

  • "Go back one page" button - for some reason doesn't work

    For some reason, multiple pages are showing up - duplicates of the page that I'm viewing, so when I click on the "go back one page" button nothing happens - I'm required to right click on the button and select the actual last page that I want to view

  • HT5882 Can't adjust the volume on my iPhone 5s when in doc

    I have my iPhone 5s in the doc and my headphones plugged into the back.  I can't seem to adjust the volume.  It is wayyyyyy too loud.  Can you help me?

  • Native Monitor DPI?

    I just got the Apple 30" display and can't seem to find the native dpi of the monitor. I'm not talking about the resolution. I"m fairly new to Mac and my old monitors running in Windows was at 96 dpi. I'm trying to find out so I can set Photoshop up

  • How to implement node affinity for java type concurrent programs.

    How to run a concurrent program against a specific RAC instance with PCP/RAC setup? (Doc ID 1129203.1) This works for non java registered concurrent programs but not java registered with use the DBC file EBS RAC environment with two RAC nodes. We wou

  • AE Compositor Link & 3ds Max Motion Blur Flip

    Hi, I have imported an object into AE via the compositor link and state sets in 3ds Max. However the key frames come in as held key frames so I have to first fix that. Does anyone know why they might come in as square key frames instead of diamond sh