JSP Flush not working on submit to page

I have a page that gets called from another with a badic submit button. In the second page I flush the stream and then wait 10 seconds. The problem is that the browser does not show the response until it is done getting the data and then the whole page shows up. What gives? BTW If I hit the refresh button on the page then it works fine.
Code below:
<html>
<head>
     <title>This is the title</title>
</head>
<body>
here it is.
</body>
</html>
<%
out.flush();
Thread.sleep(5000);
%>
Response after

The browser doesn't have to synchronize itself with your output, and there's so much buffering between your JSP and the browser that it couldn't even attempt that anyway. Also, it's quite common that the browser won't display the page until it has received it all, especially if there are tables involved, because it doesn't know how to render the first part until it sees what comes later. I can't imagine why you would want to stall the output, the Internet is slow enough as it is.

Similar Messages

  • OC4J JSP Debugging not working for all the jsps

    Hi,
    Initially I was not able to debug jsps using Eclipse and OC4J. The jsp debugging started working once I made the below changes:
    1) global-web-application.xml is modified
    Changed the attribute development="true" in orion-web-app
    Added the below init param for the JspServlet
    <init-param>
    <param-name>debug</param-name>
    <param-value>class</param-value>
    </init-param>
    If the jsps are present in a sub directory under the webcontent none of the breakpoints are working. I am still be able to view the jsp pages on the browser.
    Tools: Oracle 10g Application Server Standalone version(10.1.3.5.0), JDK5, Windows XP, Eclipse Indigo
    Project Structure:
    Test (Eclipse Dynamic Web Project)
    -WebContent
    Sample.jsp ( Breakpoints are working)
    -subF (Folder)
    SubSample.jsp (Breakpoints are not working)
    -WEB-INF
    web.xml
    Debugging worked for http://localhost:8888/Test/Sample.jsp
    Debugging not working for http://localhost:8888/Test/subF/SubSample.jsp
    Any help is highly appreciated.
    Regards
    Danny

    This tells there is not enough main memory (not disk space) for the program to run.
    - You can look the dump in ST22, it will have suggestions on increasing the ROLLAREA??, you can forward that to Basis.
    - Most likely you will not have any more memory to assign so the above may not be feasible. Try to rework your query so it works with less data.

  • Response.sendRedirect("abc.jsp") is not  working

    Hello,
    I deployed my web application(jsp with business components) on AS 902.
    Web cache is running on port 80.
    Apache is running on 7778.
    To pass request i use,
    mod_proxy.c in http.conf. and
    <virtual host> for my application, to get required url.
    It is running fine, But response.sendRedirect("abc.jsp") is not working properly. It redirects the request to apache directly and skips web-cache. Also it changes url for the page given in method.
    While the same application was running ok on v 10222a. That version handle this method properly.
    how to remove this error ???
    Plz hurry up. Our product is ready for launching on 9iAS. It is final testing.
    Thnx.

    Tahir,
    What is the exact error message you are hitting.
    Are you able to use web-cache with other examples.
    Can you try testing it the the webcache demos that are part of ojspdemos.ear under /j2ee/home/demo.
    -Prasad

  • I upgraded to version 9 from version 8. The following items do not work properly - menu, home page, navigation bar, wheel click. I backed up to version 8, and none of this stuff works right. How do I fix this?

    When I open Firefox, the bookmark menu is a little tab in the upper left corner. If I go to view and un-click bookmark menu and then view, click it, the standard menu bar shows up. The Back and Forward buttons don't work. The navigation window does not show the URL of the current page. When opening, the home page does not come up. The wheel click works on the bookmark bar, but not within a page. The menu (file, edit, etc) does not work after the first page. Version 8 worked well. When I upgraded to version 9, all this trouble started. I backed up to version 8, but the problem persists.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox

  • My Safari browser is not working well. Junk pages keep poping in and key pages for me appear intoxicated by alien pop ups preventing me navigate that page. Updated last Safari version and problem prevailed. Tried downloading Safari for Mac OS X Mavericks.

    My Safari browser is not working well. Junk pages keep popping up and key pages, for me, appear intoxicated by alien pop ups preventing me navigate that page.
    I updated to latest Safari version (7.0.4) but the problem persists.
    I tried downloading a new version of Safari for Mac OS X Mavericks but couldn't find it available.
    Thanks for your help.

    The pop ups are malware. It's not necessary to reinstall Safari.
    Help here ..
    The Safe Mac » Adware Removal Guide
    The Safe Mac » Genieo
    The Safe Mac » Mac Malware Guide
    Just so you are aware, on a Mac running Mavericks, the only way to reinstal Safari to to restore OS X using OS X Recovery

  • Front page opens works shortly freezes. only yellow green buttons work. I click yellow to minimize normal top bar menu appears I choose new page, opens works normally. The restart saved tabs does not work on that first page.

    front page opens works shortly freezes.
    only yellow green buttons work. I click yellow to minimize normal top bar menu appears I choose new page, opens works normally.
    The restart saved tabs does not work on that first page.

    Hi @prdstudio3 ,
    Thank you for visiting the HP Support Forums. The Serial Number needed to be removed from your Post. This is From our Rules of Participation:
    Protect privacy - yours and others'. Don't share anything about yourself that you would not want to see on a road-side billboard. Don't post contact or other personal information-your own or anyone else's-or any content that you receive in one-to-one communications without the author's consent. For example, don’t post your computer’s serial # or contact information publicly, and do not allow someone you don’t know to remotely take control of your computer.
    If you need people to contact you directly, either ask them to send you a private message or subscribe to the thread so you will be notified when there are replies. You may also click on your name anywhere in the forum and you will be taken to your profile page, where you can find a list of threads you have participated in.
    Sharing personal email addresses, telephone numbers, and last names is not allowed for your safety. If you have any questions feel free to send me a private message in reply.
    Thank you
    George
    I work for HP

  • Jsp:useBean  not work when I install aplication!!

    Hi
    I developing an application with UIX JSP on Jdeveloper 9.0.2 and i using something like this:
    <jsp:useBean id="cbean" class="oracle.jsp.dbutil.ConnBean" scope="session" />
    <jsp:setProperty name="cbean" property="dataSource" value="jdbc/BiblosConnectionCoreDS" />
    </jsp:useBean>
    <%
    try{
    cbean.connect();
    This code work fine in standalone mode, but when i install this application on 9IAS, with an archive War, the code <jsp:useBean, not work.
    What is missing for? o What is the reason for this situation
    Thanks for some help?

    many thanks for your reply, and I have download new updates driver from your website (http://consumersupport.lenovo.com/en/DriversDownloads/drivers_show_890.html) and Installer it on my Y410 but it still does not work!!!
    the firstly: when I star up with win7, I can see a speaker icon right down near the clock, when I click mouse on it, I can see: Volume Mixer - Speaker with Device(Speaker Hight definition Audio Device, Digital Audio(S/PDIF) ( Hight definition Audio Device) ).
    Look in devicemanger I can see "Sound , video and game controll " has already installer with 'Hight definition Audio Device ' & 'Unimodem Hafl-Duplex Audio Device' below... but I cannot hear the sound when I play music, video, games...etc...
    the second: when laptop wakeup after 'sleep' mode, I can hear sound on speaker! but headphone jack does not work when I plug my headphone jack into it (I cannot hear sound with headphone), however I still hear sound from speaker, in this case!  
    Can you help me or tell me how I can do ?!
    Thanks and Best Regards,
    jupitervn

  • I have a printer xerox 3220 on networking ,have pc´s and a mac ,problem:it´s already install but does not work ,only print many page with code program,i will appreciate the solution

    i have a printer xerox 3220 on networking ,have pc´s and a mac ,problem:it´s already install but does not work ,only print many page with code program,i will appreciate the solution

    Hi guillermospain,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    OS X: Connecting a Wi-Fi printer to your Wi-Fi network
    http://support.apple.com/kb/ht3500
    OS X Mountain Lion: Set up a printer
    http://support.apple.com/kb/PH11145
    OS X Mountain Lion: Reset the printing system
    http://support.apple.com/kb/PH11143
    Cheers,
    - Judy

  • Bean is not worked  in the jsff page

    Hi
    JDeveloper Studio Edition Version 11.1.2.2.0
    I Have a bean for run a jasperreport
    package Reports;
    import javax.faces.event.ActionEvent;
    import sp11.model.apm.clubImpl;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.math.BigDecimal;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.type.WhenNoDataTypeEnum;
    import net.sf.jasperreports.engine.util.JRLoader;
    import net.sf.jasperreports.view.JasperViewer;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.binding.BindingContainer;
    import oracle.jbo.client.Configuration;
    public class CardFrontBean {
    public CardFrontBean() {
    public String runReportAction(){
    DCIteratorBinding rleIter = (DCIteratorBinding)getBindings().get("RealentityIterator");
    String RleId = rleIter.getCurrentRow().getAttribute("RleId").toString();
    BigDecimal ID = new BigDecimal(RleId);
    Map parameter = new HashMap();
    parameter.put("ID", ID);// where ID is a jasper report parameter
    try
    runReport("card_front.jasper", parameter);
    catch (Exception e)
    return null;
    public BindingContainer getBindings(){
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    public ServletContext getContext(){
    return (ServletContext)getFacesContext().getExternalContext().getContext();
    public HttpServletResponse getResponse(){
    return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
    public static FacesContext getFacesContext(){
    return FacesContext.getCurrentInstance();
    public void runReport(String repPath, java.util.Map param) throws Exception {
    Connection conn = null;
    try
    HttpServletResponse response = getResponse();
    ServletOutputStream out = response.getOutputStream();
    response.setHeader("Cache-Control", "attachment;filename=\"CardFront.pdf\"");
    response.setContentType("application/pdf");
    ServletContext context = getContext();
    InputStream fs = context.getResourceAsStream("/ReportsFolder/" + repPath);
    JasperReport template = (JasperReport) JRLoader.loadObject(fs);
    template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
    PreparedStatement statement = null;
    String amDef = "sp11.model.apm.club";
    String config = "clubLocal";
    clubImpl am = (clubImpl)Configuration.createRootApplicationModule(amDef,config);
    statement = am.getDBTransaction().createPreparedStatement("select 1 from dual", 0);
    conn = statement.getConnection();
    JasperPrint print = JasperFillManager.fillReport(template, param, conn);
    //JasperViewer.viewReport(print, false);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    JasperExportManager.exportReportToPdfStream(print, baos);
    out.write(baos.toByteArray());
    out.flush();
    out.close();
    FacesContext.getCurrentInstance().responseComplete();
    catch (Exception jex)
    jex.printStackTrace();
    finally
    close(conn);
    public void close(Connection con){
    if (con != null)
    try
    con.close();
    catch (Exception e)
    and a commandButton in the .jsff page
    <af:commandButton id="Realentitycardfront"
    textAndAccessKey="#{nls['REALENTITY_CARDFRONT']}"
    shortDesc="#{nls['REALENTITY_CARDFRONT_HINT']}"
    action="#{CardFront.runReportAction}"/>
    my .jsff page is in a bounded task flow with Use Page Fragments = true
    when i click the button. ........>nothing
    what is the matter
    i read in a post that it is not work in jsff page with page fragmentation
    please help me
    thanks

    One problem is that you write into the output stream from an action method and don't know what's already in the output stream. Once there is one byte written to hte stream (which you can't know from inside the action method) the pdf stream does not behave as you think it would.
    Next thing is that you use createRootApplicationModule but never release it. This will get you out of resources error eventually.
    A better approach would be to put this code in a servlet and stream the report from there. In the servlet you have control over the output stream.
    Check my blog http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/ where I show how to serve images from a servlet which can even use the application module pool from the application (no need to use createRootApplicationModule at all). All you have to do is to exchange the part where I get and stream the image data to your needs.
    Timo

  • JSP compenent not working in mozilla and firefox

    Hi Experts,
    We have made a portal component with JSPs. And assigned it to anonymous page on our portal.
    Same is working fine with IE. However, with Mozilla and Firefox it gets distorted.
    Anyone knows whether mozilla supports JSP pages or not?
    Is there problem with Support pack?
    I am using EP 7.1 and SP 10 for the Mozilla Browser version (3.6.25 and 8.0.1).
    Your helps will be appriciated.
    Regards,
    Chitra

    Dear Chitra
    Please check Product Availability Matrix in service market place to verify the compatibility for accessing JSP in mozilla,
    I think it should work in 3.6.25 but not sure about 8.0.1, please check and verify in SMP
    Best Regards
    Arun Jaiswal

  • Out.flush() not working

    I can't get the out.flush to work. The page is paused until all values are finished then it is displayed. Here is my example code.
    <pre>
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class MyTest extends HttpServlet {
         public void init(ServletConfig conf) throws ServletException {
    super.init(conf);
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
    // res.setContentType("text/html"); //this nor the one below works
    res.setContentType("multipart/x-mixed-replace;boundary=\"boundary\"");
    PrintWriter out = res.getWriter();
    for(int x=0;x<3;x++){            
         out.println("<br>x = "+x);
         out.flush();
              try{
                        Thread.sleep(1000); //in milliseconds - 1000 milliseconds = 1 second
                   catch(InterruptedException ie){}
    </pre>

    You were hoping that the output of the servlet would be sent piece by piece to the client browser as you generated it? That is not how it works. Nothing is sent until you return from the service method. It is possible to do what I think you were hoping, but you have to work with the browser and have it refresh periodically. I have seen examples of that but I am not competent to try to explain it.

  • Help needed "tabEnabling" not working in simple login page - Flex

    Hello Friends,
    I need a small help in Flex. I am doing a simple login page application  in FlashBuilder 4.0 & i have kept 2 input boxes like Login,Password  and a submit buttion. On clicking the button i am calling a method, so  far everything is working fine.... But some how tabenabling is not  working. suppose if you are in login inputbox and i press "tab key" it  has to go to password input box.. but its not working. can any one help  me on this, why it is not working. i have tried all the attempts using  tabEnabled = "true". but stil i am failing to do this.
    your help would be appreciated.
    Rajesh
    Message was edited by: Rajeshb_Flash

    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
       width="100%"
       height="100%"
       verticalAlign="middle"
       horizontalAlign="center">
    <mx:Script>
      <![CDATA[
       import com.tel.model.EventConstants;
       import mx.controls.Alert;
       import mx.managers.CursorManager;
       import mx.rpc.events.FaultEvent;
       import mx.rpc.events.ResultEvent;
       import mx.rpc.http.mxml.HTTPService;
       private var httpService:HTTPService;
       public var userID:String = "";
       public function init():void{
       private function mouseClickSubmit():void{
        if(userName.text != "" && password.text != ""){
         userID = userName.text;
         initService();
        }else{
         if(userName.text == ""){
          Alert.show("Please enter 'User Name'.","Alert!")
         }else if(password.text == ""){
          Alert.show("Please enter 'Password'.","Alert!")
       private function initService():void{
        var params:Object = new Object();
        params["userName"] = userName.text;
        params["password"] = password.text;
        httpService = new HTTPService();
        httpService.showBusyCursor = true;
        httpService.resultFormat = "xml";
        httpService.method=URLRequestMethod.POST;
        httpService.addEventListener(ResultEvent.RESULT, httpServiceResultHandler);
        httpService.addEventListener(FaultEvent.FAULT, httpServiceFaultHandler);
        httpService.url = "Login.action";
        httpService.send(params);
       private var boolFirstRun = true;
       private function httpServiceResultHandler(event:ResultEvent):void{
        httpService.removeEventListener(ResultEvent.RESULT, httpServiceResultHandler);
        httpService.removeEventListener(FaultEvent.FAULT, httpServiceFaultHandler);
        httpService = null;
        var resultXML:XML = new XML(event.result.toString());
        if(resultXML.children().toString() == "true"){
         boolFirstRun = false;
         dispatchEvent(new Event(EventConstants.LOGIN_SUCCESS))
        }else{
         userName.text = "";
         password.text = "";
         Alert.show("Login Failed! Invalid 'User Name' or 'Password'.","Alert")
       private function httpServiceFaultHandler(event:FaultEvent):void{
        httpService.removeEventListener(ResultEvent.RESULT, httpServiceResultHandler);
        httpService.removeEventListener(FaultEvent.FAULT, httpServiceFaultHandler);
        httpService = null;
      ]]>
    </mx:Script>
    <mx:Panel title="Login Page" width="400" height="300" styleName="loginPanel" verticalAlign="middle" horizontalAlign="center" backgroundImage="assets/images/hello.jpg" backgroundAlpha=".1">
       <mx:VBox width="260" height="95" styleName="loginBox" backgroundAlpha=".2">
       <mx:HBox width="100%">
        <mx:Label width="85" text="User Name" styleName="loginTextStyle"/>
        <mx:TextInput width="150" id="userName"/>
       </mx:HBox>
       <mx:HBox width="100%">
        <mx:Label width="85" text="Password" styleName="loginTextStyle"/>
        <mx:TextInput width="150" id="password" displayAsPassword="true"/>
       </mx:HBox>
       <mx:HBox width="100%">
        <mx:Spacer width="80%"/>
        <mx:Button label="Enter" id="submit" click="mouseClickSubmit()"/>
       </mx:HBox>
      </mx:VBox>
    </mx:Panel>
    </mx:VBox>

  • JSP/Servlets not working after upload

    I have a JSP file and some servlets that work fine on my PC running Tomcat.
    I just uploaded them to my web server (which supports servlets/jsp and has apache web server running), but they do not work. The jsp file does not run, it just displays the source code.
    Strangely, the support people at my server say the jsp files run ok when they view them. But when I view them from my browser it just shows source code.
    Do I need to configure something in my program? Or is it a server problem?

    Very hard to help without seeing the page - the answer is in the code  :-)
    Can you please point a link to your page?
    Are you sure you uploaded all the image files, and that the paths to the images are all correct?
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Sites with .jsp extention not working completely

    websites having extension .jsp are not showing propperly

    Normally, when a webserver uses JSP, they instruct Firefox that the content type of the page is text/html, so Firefox doesn't treat those .jsp pages differently from other server technologies.
    Could you provide a link to a page that is not showing properly and describe how it differs from what you expect?
    More generally:
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    "3-bar" menu button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site, try either:
    * right-click and choose View Page Info > Security > "View Cookies"
    * (menu bar) Tools > Page Info > Security > "View Cookies"
    * click the padlock or globe icon in the address bar > More Information > "View Cookies"
    In the dialog that opens, you can remove the site's cookies individually.
    Then try reloading the page. Does that help?

  • JSP-Editor not working properly

    Hi everybody,
    I am working with ISA5.0 and NWDI. I have checked out the Web-Module Project crm/isa/web/b2b.
    Now I would like to modify JSP-Files. Unfortonately the JSP-Editor is not working properly.
    The JSP-Editor cannot resolve references to Tag-Libraries like
    <%@ taglib uri="/isa" prefix="isa" %>
    Furthermore I get Errors with JSP-Includes
    <%@ include file="checksession.inc" %>
    The JSP-Editor does not show any other compile errors until the above mentioned errors are resolved.
    So the JSP-Editor does not help with compile errors.
    I have tried to use Lomboz instead, but due to the modularization in ISA5.0 and NWDI (ie the Taglibraries are defined in a separate module) I did not get it to work either.
    Does anybody have experience on how to get the JSP editor to work properly?
    Thanks for your help,
    Andreas

    Highlite the clip in the timeline, control click on it and choose "send to soundtrack as an audio file project" in the pop up menu. Don't do an "open with editor". This should work.
    If it doesn't and it's just the one clip, you could launch Soundtrack and then open that clip as an audio project . . . don't do a open with editor, just open it directly. Make your adjustment and save over writing the file with the new audio. You may want to copy the clip first as a backup. When you open your FCP project, you'll have to re-link the clip. Once you do it will show up with the new sound.

Maybe you are looking for

  • How can I stream my iTunes library to my iPhone or iPad?

    How can I stream my iTunes library to my iPhone or iPad?

  • Send mail notification on creation of substitute through SBWP.

    Hi All We create substitution for a person through SAP Mailbox. Settings>>Workflow settings>>Maintain substitute. This maintains the table HRUS_D2. How can we send a notification mail to the concerned people (the person who has been created as the su

  • ABC analysis

    Hi, for the client we have customized the ABC analysis report which shoes the material details and its status for the last 5 years,with last purchase and sales date. Some materials are not been caught in this report. What may be the reason for this?.

  • Document Number range restart

    Dear Experts, Our FY is from Jan-Dec. therefore, we will be starting New FY Jan 2010. Please help me and let me please know, whether to start a New FY with restarting FI document number range. I check in SPRO settings for most of the document number

  • Can't find my LaCie BigDisc!

    Accidently pulled the powercord for my BigDisc with a huge project on it and now the computer will not mount it on the desktop. Desperate for help on what to do. Are there any tools to find it again or am I screwed? I'm on Os X 1.3.9