Streaming HTML

One of the servlets my team maintains needs to output over 200 fields for several hundred records. Right now it takes awhile for the user to see anything because the entire HTML is created for all of the fields for all of the selected records before it's sent to the browser. Is there a way to 'stream' the HTML so the user would see it in their browser as the ResultSet is being processed? Would using a JSP help?

Do you need to show all the results at once? If you don't you could show a number at a time (10-20 at a time, for example); this would reduce the response time. If you need to show all the results in one page, you can gzip the results for faster download or use an applet as a front-end to the data so that you can 'flush' the results to the user as they are processed.

Similar Messages

  • How can I put an output stream (HTML) from a remote process on my JSF page

    Hello,
    I've a question if someone could help.
    I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
    So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
    Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
    Thank you in advance
    A.
    Just if you want to look at the details .....
    // Create the remote model
    com.sas.sasserver.submit.SubmitInterface si =
    (com.sas.sasserver.submit.SubmitInterface)
    rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
    // Create a work dataset
    String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
    si.setProgramText(stmt);
    // Setup our socket listener and get the port that it is bound to
    com.sas.servlet.util.SocketListener socket =
    new com.sas.servlet.util.SocketListener();
    int port = socket.setup();
    socket.start();
    // Get the localhost name
    String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
    stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
    si.setProgramText(stmt);
    // Setup the ods options
    stmt = "ods html body=sock style=brick;";
    si.setProgramText(stmt);
    // Print the dataset
    stmt = "proc print data=work.foo;run;";
    si.setProgramText(stmt);
    // Close
    stmt = "ods html close;run;";
    si.setProgramText(stmt);
    // get my output stream
    context = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
    ServletOutputStream out = response.getOutputStream();
    // Write the data from the socket to the response
    socket.write(out);
    // Close the socket listener
    socket.close();

    The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
    "Ftp
    Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
    ftp [-v] [-n] [-i] [-d] [-g]
    [-s:filename] [-a] [-w:windowsize] [computer]
    Parameters
    -v
    Suppresses display of remote server responses.
    -n
    Suppresses autologin upon initial connection.
    -i
    Turns off interactive prompting during multiple file transfers.
    -d
    Enables debugging, displaying all ftp commands passed between the client and server.
    -g
    Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
    -s:filename
    Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
    -a
    Use any local interface when binding data connection.
    -w:windowsize
    Overrides the default transfer buffer size of 4096.
    computer
    Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
    r on the line."
    I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done.

  • Streaming html with images

    Hi there!
    I am having some trouble with Data Service that I have created, what it basically does is use templates to generate an HTML page by replacing placeholders and fitting sections together depending on the criteria.
    One template looks like this:
    <html>
    <head>
    <meta http-equiv="refresh" content="60" />
    <style type="text/css">
    </style>
    </head>
    <body>
    <div class="CSSTableGenerator" >
    <table>
    <tr>
    <td>Kiron Interactive<img src="{EventCardImagePath}\Images\Kiron_Logo.png" alt="Mountain View"></td>
    </tr>
    <tr>
    <td>Event Card for {EventCardDateDOW}, {EventCardDateDay}/{EventCardDateMonth}/{EventCardDateYear}</td>
    </tr>
    <tr>
    <td>{EventCardEvents}</td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    What I am having issues with is getting the image to display in the browser, the image is presented as 
    {EventCardImagePath}\Images\Kiron_Logo.png
    in the template, it can be any name or popular format (JPG or PNG)
    Currently this is how I am returning the HTML string generated
    /// <summary>
    /// Method used to Get GSEvents and pass them to the formatter, HTML is then returned using current date
    /// </summary>
    /// <param name="eventType"></param>
    /// <returns>HTML Event Card string</returns>
    public System.IO.Stream HTMLEventCardUpcoming(string eventType)
    try
    //Compile DateTime
    DateTime startTime = DateTime.Now;
    DateTime endTime = DateTime.Now.Date;
    endTime = endTime.AddDays(1).AddTicks(-1);
    //Get the events
    //Pass events to Adapter
    EventCardFormatterAdapter eventform = new EventCardFormatterAdapter();
    object htmlEventString;
    bool htmlEventStringbool = eventform.TryFormatEventCard(events, startTime, EventCardFormatterAdapter.EventCardFormat.html, out htmlEventString);
    string htmlString = htmlEventString.ToString();
    byte[] resultBytes = Encoding.UTF8.GetBytes(htmlString);
    WebOperationContext.Current.OutgoingResponse.ContentType = "text/html";
    return new MemoryStream(resultBytes);
    catch (Exception e)
    Preferable I would like to be able to specify the local path of the image in the template that's whats currently being done, this is because the template is also used to generate PDFs and that needs the local path but thats working perfectly. Any ideas on
    how I can accomplish this?
    At the moment images are only working in IE
    Thanks in advance

    Hi
    DaveGreen,
    Based on your description, your case related to Web HTML. I am afraid that you posted in an inappropriate forum.  Please post in the related forum.
    Here is the link
    http://forums.asp.net
    Thanks for your understanding.
    Best regards,
    Kristin
    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.

  • How to publish swf file as streaming html on LMS?

    Hi Folks
    When i try to publish a swf file it creates a html file and
    works fine. but when its created in the folder. It creates a skin
    file, 2 html files and standard file. When i publish it on LMS to
    create a streaming flash file nothing is seen. Is there any other
    way to publish. It is not a scrom compliant LMS. If that helps.
    Appreciate all the replies
    Thanks!

    Hi again
    I think you are probably still seeing the _skin.swf file
    because I don't believe that Captivate deletes the files prior to
    creating the new ones. So you should probably clear the folder
    before publishing again. Once you do that, you should see only
    three files.
    Cheers... Rick

  • Live-Streaming HTML

    Is it possible with servlets (java's answer to asp, cgi, etc)? I'm having a bit of trouble trying to get to the lower level socket of the http connection. All I can find are wrapper classes which builds an entire new http response everytime I flush the stream.
    At the moment, I'm trying to find a way to send the data in realtime without having the servlet build a brand new HTTP response. Unfortunately, the HTTP protocol is by nature unidirectional. Anyone familiar with servlets aware of a way to get the raw HTTP socket connection?

    public ServletOutputStream getOutputStream()
    This seems promising, I've been using this method which is inherited by HttpServletResponse. Perhaps ServletResponse will not add the HTTP headers which HttpServletResponse does.
    Also is it possible to keep the connection open after committing a servlet response? Or is this a server setting that can only be changed by a server administrator? ("Connection: close" header)

  • 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

  • Display HTML stream in Web Dynpro application

    Hello,
    Sorry, I am new to the Web Dynpro environment, so this might seem like a stupid question.
    How can I display streaming HTML content in a Web Dynpro application.  The IFrame element only seems to allow you to point to a URL.  In this case, I am receiving an HTML stream back from an R/3 system via a BAPI call.
    Thanks very much.

    Hi
    As per your question, I understand that HTML output is getting generated through a R3- Bapi call. Fine, create a model with the data binding to the context to some text view. Simply create view with the relevant UI element through which you want to exhibit the data and call the R3 call through your model. instead of a HTML output, you will get your data in the view.
    you may not get the exact format / style of the html output.
    Otherwise, directly HTML content cannot be shown in webdynpro. You need to have some UI control to take its content.
    Or else, you can go in for j2ee stack and end up with a java based appl, use a simple jsp and get the output!
    if you have any specific queries do let us know
    hope this helps you
    thanks

  • I am unable to transfer photos from my camera roll to a shared photo stream.

    I have be able to get 297 pics over to a shared photo stream, but it is very temperamental. Ever since I started trying to transfer over photos, my iphone 5 has been ating up. Apps close on there own. I have reset and restarted my phone many many times. I am running out of storage on my phone and I am under the impression that I can keep photos in a shared photostream forever and then delete them on my phone to make more room. Is this true? I have backed up all my photos to my pc, but I like to have them on my phone too. Anyone know how to fix the problem with tranferring photos from camera roll to shared photo stream? Thanks!

    Amybeth
    Photostream photos are kept in Photostream for 30 days.. it's not really a long term storgae media.  It's a temporary storage on your way to a computer storage solution.
    http://www.apple.com/icloud/features/photo-stream.html
    Cheers

  • Working with JEditorPane to display HTML page

    iam loading html page into JEditorPane .
    how to get the html form data to validate
    give me soluation for this problem ...
    thanks ....
    karthi

    Search for occurences of <img> tags in the stream and replace its src="" contents by for example src="image?id=orginatingimagefilenameorso" and write kind of an ImageServlet mapped on "/image*" which streams the right images to the response.
    You may find this ImageServlet example useful: http://balusc.blogspot.com/2007/04/imageservlet.html
    After all, why are you streaming HTML files through a servlet instead of just linking to them? Aren't they public accessible or so? If this is the case, consider creating a virtual host on the application server so that you can just access those files through a simple plain vanilla URL.

  • How to access streaming vedio from server using RMI

    Hello please provide me the solution
    i have one vedio file in remote system and i want to import it to my local system using RMI after that i have to control it like vedio player.This entire application should be developed in struts.
    please give me a basic idea how to approch and wht r the files i need to import and is there any classes available to control the remote streaming vedio.

    If you are using Struts then you are in a web environment. So there is no RMI for the client (browser), it is just HTTP.
    About streaming video take a look at JMF (Java Media Framework). And if you are over HTTP you can use something like this to embed your video streaming:
    <html>
    <body>
    <object width="320" height="63"
    classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
    ccclassid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
    standby="Cargando los componentes del Reproductor de Windows Media de Microsoft..."
    type="application/x-oleobject">
                <param name="filename" value="http://192.168.1.31:1025/01_Alegria.mp3">
                <param name="url" value="http://200.32.112.67/Estacion_del_Sol">
                <param name="AutoStart" value="true">
                <param name="volume" value="100">
                <param name="uiMode" value="mini">
                <embed type="application/x-mplayer2"
            pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
            width=218
            height=129> </embed>
            </object>
                <param name="url" value="http://200.59.146.10/rockandpop-ba">
    </body>
    </html>Hope it helps

  • Convert ASCII File into HTML

    Hi All,
    I have a requirement to convert ASCII files (formatted files when opened through Textpad / Editplus) into HTML when its hyperlink is clicked from my application.
    The present code is that, the TXT file was streamed, html tags have been added and the entire file was re-written as HTML (based on char 12 / 32, as the case may be) and saved as JSP / HTML extension, and placed in a temp folder.
    response.sendRedirect() was used to open this file, which threw OutofMemoryException errors.
    It was also revealed that, if the original ASCII file was 40KB, the converted JSP file would be 160KB (around 4 times)
    The ideal conversion should be - add html tags in the new file and maintain the same formatting as the original ASCII file, & save the file with new extension.
    Thus I need a memory efficient method such that these files are converted on the fly by the application, yet the size kept minimum.
    Please suggest. Thanks in advance
    Regards
    Hari N

    160k is trival on a modern desktop OS. Especially since it is temporary. What heap size is the server using?

  • Does photo stream work?

    Does it effectively push all the photos you take or import to all your Macs and iPad?
    I have 2 Macs and iPad, but one of the Macs is not up-to-date with all my pics. Will photo stream automatically sync that Mac with the other Mac and iPad which are up-to-date or will I have to import the missing pics to that Mac some other way?
    I have been reluctant to buy this product because of all the negative reviews.

    http://www.apple.com/icloud/features/photo-stream.html
    It streams all of the photos you take - it does not stream the ones you import or ones taken prior to adding Photo Stream
    LN

  • HT4906 What does Photo Stream Do?

    I'm just upgrading to Mountain Lion and not familiar with all the iCloud services. What does Photo Stream do? Can you limit the photos that go to iCloud storage? Can you allow some pics to be seen by others, but not all? etc.

    There is no iCloud storage. Photostream is just a way of importing from one device to many. It never contains more than 1k photos or photos for more than 30 days - which ever limit is reached first.
    http://www.apple.com/icloud/features/photo-stream.html
    You don't have to use Photostream. It's not a method of sharing with others.
    Regards
    TD

  • What is the difference between photo stream and camera roll?

    And...what is iPhoto?  Confused by all of the terminology

    Photo Stream is a feature of iCloud;
    http://www.apple.com/icloud/features/photo-stream.html
    The Camera Roll is an album on the iPad with any photos that you transfer from a camera or memory card using the Camera Connection Kit to the iPad or any screen shots that you take with the iPad or any photos that you take with the cameras on an iPad 2, as opposed to any albums that you have synced to the iPad from your computer using the iTunes app. The Camera Roll comes and goes as needed. If you have no photos that would go into the Camera Rol, it disappears, and returns when it is needed.
    iPhoto is an Apple photo app for the Mac computer. It is part of the iLife suite of Mac apps;
    http://www.apple.com/ilife/iphoto/

  • Places and faces not syncing with photo stream

    Hello,
    I put some of my pictures from my Mac Pro's iPhoto library into Photo Stream with the intention of grabbing them into my MacBook Pro's iPhoto library.
    They download and the events are generated but the Faces and Places information did not come along :-(
    I'm wondering if this is by design (I sincerely hope not!) or a bug...
    Any thoughts?

    Here's the English version
    http://www.apple.com/icloud/features/photo-stream.html
    It clearly states
    when you take a photo on one device, it automatically appears on all your other devices. No syncing. No sending. Your photos are just there. Everywhere you want them.
    No mention of Faces and Places there.
    Or
    it automatically imports every picture from your Photo Stream into your photo library so you can edit, delete, and share the ones you want.
    Again, no mention of Faces and Places here, or anywhere on that page.
    It's not a bug. It's just not a feature.
    Regards
    TD 

Maybe you are looking for

  • Can I use Motion 5 without Final Cut Pro but maybe for iMovie?

    Hi guys, if I buy Motion 5 can I use it to create a project without Final Cut Pro or X or what ever?! And can I create transitions for iMovie? Thanks

  • LR4 LR5 GPS

    I reported a bug to Adobe which meant that GPS information from the Panasonic GH3  was not displayed or used in LR4. I believe this applied to some other cameras too. I am happy to report that GPS from the GH3 is now read properly and as well as disp

  • Extremely slow boot in my MBP Retina

    It used to be few seconds. I have a fresh installation of Mavericks. It takes now 47 sec. For 35 sec there is a grey screen, then Apple logo appears. It's quite horrible. What can be the cause and how to make it working normally :

  • Zen Touch - Problem adding and deleting fi

    I got a zen touch, plug it in the pc and the zen says 'docked', the computer says found zen etc. I open the zen in My Computer, click on the music library, it opens, all of my music is displayed as normal but when I try and delete a track/album etc,

  • BEx Broadcast Issue

    When I execute a broadcast of workbook, the popup window with url http://<appserver>/sap/bw/Mime/BEx/Misc/PleaseWait.html comes up and it remains open and blank without executing the broadcast.  This has worked before.  When it works, the pop up wind