Progress bar in my JSP

I HAVE A JSP THAT TAKE SOMETHING OF TIME IN RUN DATABASE QUERIES, I NEED TO SHOW A PROGRESS BAR WHILE ITS RUN .
HOW I DO THIS ? IN JAVASWING OR JAVASCRIPT? I NEED IT URGENT.
I NEED TO KNOW HOW DO MY PROGRESS BAR.
THANKS

stop yelling...
This thread:
http://forum.java.sun.com/thread.jsp?forum=45&thread=443328
the 1st reply has some code I've used to do something similar. You could have it write out some Javascript stuff to update a progress display if you wanted. Otherwise it'll just block til the thread is done. You'd have to write the worker thread. It also uses struts stuff, but you should be able to figure out how to remove those parts.

Similar Messages

  • Progress bar onLoad of jsp page.

    Hello all,
    I was wondering how to put a progress bar on load of jsp page.
    Also I have html page that calls a servlet. It takes some time to run it.
    So, is there a way to put a progress indicator while serlvet is doing work?
    thanks

    You can fix that in your page template by putting something like this just before the BODY tag in the Header region:
    <div id="loading"
      style="display: block;
             position: fixed;
             top: 0px;
             left: 0;
             z-index: 1999;
             width: 100%;
             height: 100%;
             background-color: #fff;
             text-align: center;">
    <div style="position: relative;
                top: 130px;">
    Wait..loading..
    </div>
    <img src="#IMAGE_PREFIX#themes/theme_200/images/loading.gif" height="32" width="32"
       style="position: relative;
              top: 150px;"/>
    </div>and putting something like this just after the closing BODY tag in the Footer region:
    <script>
    $(document).ready(function(){
      $('#loading').hide();
    </script>

  • Progress bar in JSP

    Hello Guyz,
    I need some idea to put up a progress bar.
    I want to implement this in pure JSP without using any swing components or Javascript.
    Can i do it using Just JSP..and servlets in..
    Im doing this is in MVC architecture...
    So please do help me..I wud be gratefu;l to u..
    Regds,
    Gokul Kannan Jeyapaul

    Using the value 1000 in the content is excessive (that is measured in seconds, so you would be waiting for over a quarter of an hour for the page to change once...
    Here is the idea, using just a JSP, with no fancy stuffs (though it does way too much work itself...)
    <%
      //Setting up the recursion...
      //retrieve the step (or percent done) from a URL parameter.  A better
      //approach would be to store the value of a percentDone in the session
      //from the processing thread, rather than creating a parameter for it.
      int thisRound = Integer.parseInt(request.getParameter("step"));
      //Calculate the next step.  In a well designed app, this isn't here.  Next step
      //Is determined as part of the process running, not on the JSP...
      int nextRound = thisRound+1;
      //Signal an end after 5 steps.  Again, in real cases, the process taking some time
      //should signal the end...
      if (nextRound == 5) nextRound = -1;
      //determine the wait page (this JSP)
      String waitPage = response.encodeURL("simpleWait.jsp");
      //Figure out how long to sleep.  We will pass it as a parameter to the page
      //in the first call, after that, it is stored in the session
      String sleepTime = request.getParameter("sleep");
      if (sleepTime != null)
        session.setAttribute("sleepTime", sleepTime);
      else
        sleepTime = (String)session.getAttribute("sleepTime");
    %>
    <%
      //If the signal to stop the refreshing is reached, forward to the display page
      if (thisRound == -1) {
        //In real cases, the display should be stored in the session, the waiting page should
        //not have to know what it is.
        String displayPage = (String)session.getAttribute("display");
        if (displayPage == null)
          displayPage = "display.jsp";
        displayPage = response.encodeRedirectURL(displayPage);
        //before we move on, we will clean up the session, removing the things that
        //don't need to be there anymore...
        session.removeAttribute("sleepTime");
        session.removeAttribute("display");
        //remove the percentDone, as well... if stored in the session
        response.sendRedirect(displayPage);
    %>
    <html>
    <head>
      <title>Processing</title>
      <META HTTP-EQUIV="REFRESH"
            CONTENT="<%=sleepTime%>; url=<%=waitPage%>?step=<%=nextRound%>"/>
    </head>
    <body>
      <center>
      <h2>Processing Your Request</h2>
      <h3>Please Wait...</h3>
      <h3>Step Is <%=thisRound%></h3>
      <p>Thank you for your patience</p>
      </center>
    </body>
    </html>You would call it the first time with something like this:
    http://localhost:8080/Test/simpleWait.jsp?step=1&sleep=2
    meaning the page will sleep (wait) for 2 seconds before refreshing. Take note of the comments, they point out a lot about the page that shouldn't be there.

  • JSP- IE progress bar

    I have a jsp which invokes a servlet . The servlet does some processing ,
              puts a collection in the request as an attribute . The servlet uses a
              requestdispatcher to forward to another jsp page which uses the collection
              in the request attrbute to display the page . In IE 5.0 after the page has
              been displayed , the progress bar still shows that it is 'half done' or
              incomplete though the retrieval is complete . This is totally random . It
              is as if IE cannot determine the content length of the response . In
              Netscape ,
              the retrival works fine . Are there any workarounds ?
              ~JDoe
              

    Hi,
    I too had the same problem few days back, the problem used to be like this : the user hits page that fires a query that take quite some tme and depending upon the server loads peaks hour etc a lot of time user used to get 'Done' in the status bar of the browser after waiting for so much tine and getting done was irritating i found the root cause of the problem which is : when ever i submit a page request it used to fire query in the data base and the database somtime use to respond very late however the client (browser) and server communication used to break after a fix time(in my apache it s controlled by 'Timeout ' parameter in httpd.conf file) so the server and browser use to break the communication before data has come which use to result in blank page with 'Done' status in staus bar .
    What i did for resolving this problem was i changed the value of Timeout parametr from 5 min to 10 minute , now im least facing less such instances , this solution is done by extending the browser server communication . However i want to do the same by continuously doing some exchange between server and browser for which I want to develop a page that will keep on downloading a simple gif in loop till the data base responds back , so as too keep alive the browser and server communication without changing properties file .
    Does any one have the idea how to doi that??
    thanks
    rgds

  • How to determine a sql query size to display a progress bar

    I would like to show a progress of an sql query within a jsp page.
    Background:
    I have a reporting web application, where over 500 contacts can run reports based on different criteria such as date range....
    I current display a message stating 'executng query please wait', however the users (hate users) do not seem to wait, thereofore they decide to run the query all over again which affected my reportign sever query size (eventually this crashes, stopping all reports)
    Problem:
    The progress bar is not a problem, how would I determine the size of the query at runtime therefore adding the time onto my progress bar.

    Yes it's doable (we do it) but it sure ain't easy.
    We've got about 23,500,000 features (and counting) in a geodata database. Precise spatial selection algorithms are expensive. Really expensive.
    We cannot impose arbitrary limits on search criteria. If the client requires the whole database we are contractually obligated to provide it...
    For online searches We use statistics to approximate the number of features which a given query is likely to return... more or less the same way that the query optimiser behind any half decent (not mysql (5 alteast)) database management system does.
    We have a batch job which records how many features are linked to each distinct value of each search criteria... we just do the calculations (presuming a normal (flat) distribution) and...
    ... if the answer is more than a 100,000 we inform the user that the request must be "batched", and give them a form to fill out confirming there contact details. We run the extract overnight and send the user an email containing a link which allows them to download the result the next morning.
    ... if the answer is more than a million features we inform the user that the request must batched over the weekend... same deal as above, except we do it over the weekend to (a) discourage this; and (b) the official version ensure we have enough time to run the extract without impinging upon the maintenance window.
    ... if the answer is more than 5 million we display our brilliant "subscribe to our DVD service to get the latest version of the whole shebang every three months (or so), so you can kill your own blooody server with these ridiculous searches" form.
    Edited by: corlettk on Dec 5, 2007 11:12 AM

  • Error while running progress bar

    Hi ,
    I wrote the following code in process form request to get the progress bar.
    if (pageContext.getParameter("submit") != null)
    while(i<20)
    try{
    OAProcessingPage page =
    new OAProcessingPage("xxx.oracle.apps.xxap.apr.webui.testingCO");
    page.setConciseMessage("This is the concise processing page message.");
    page.setDetailedMessage("This is the detailed message which should explain what's happening.");
    page.setProcessName("Wait for some time..");
    pageContext.forwardToProcessingPage(page);}
    catch (OAException E)
    System.out.println("inside catch ");
    pageContext.putDialogMessage(E);
    System.out.println("inside loop ");
    i++;
    it showing clock symbol but the next second it shows the followin error:
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.lang.NullPointerException
         at xxhex.oracle.apps.xxrmu.repmig.webui.RepExecuteCO.processFormRequest(RepExecuteCO.java:65)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.lang.NullPointerException
         at xxhex.oracle.apps.xxrmu.repmig.webui.RepExecuteCO.processFormRequest(RepExecuteCO.java:65)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    iam new to oaf can any one please help me how to resolve it...

    hi ,
    i wrote the following code i got the clock and i moved to the home page again but no operations are performed between these two actions.following is my code.
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        string test="A";
    try{
        if( pageContext.getParameter("submit") != null) 
          OAProcessingPage page =
                              new OAProcessingPage("xxx.oracle.apps.xxap.apr.webui.testingCO");
                      page.setConciseMessage("This is the concise processing page message.");
                      page.setDetailedMessage("This is the detailed message which should explain what's happening.");
                      page.setProcessName("Wait for some time..");  
                      pageContext.forwardToProcessingPage(page);
           test="B";
    System.out.println("testing "+rtest);//this action is not done.. it is not giving any print statement whil running in local system
       catch (OAException E)
               pageContext.putDialogMessage(E);
               pageContext.forwardImmediatelyToForm("OA.jsp?page=/oracle/apps/xxap/apr/webui/TestPG&retainAM=Y");//(forward to calling page with retainAM=Y)
                HashMap hashmap1 = new HashMap(1);
                hashmap1.put("test", "test");
                  if(test!= " "){
                                            System.out.println("test "+test);
                pageContext.setForwardURL("OA.jsp?page=/oracle/apps/xxap/apr/webui/TestPG",
                                          null,
                                          OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                          null,
                                          hashmap1,
                                          true,
                                          OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
                                          OAException.CONFIRMATION);
    test value shows only "A"
    and it is also not giving any confirmation message after moving into same page. please help me on this...

  • Creating Progress Bar for File Upload

    Hi, I'm trying to implement a progress bar indicator for a file upload in WebDynpro, without very good results.
    I'm using a fileupload UI element, a TimerTrigger and a ProgressIndicator UI elements for this purpose.
    It seems that using the fileupload UI element the iview is locked during the file upload, and therefore it prevents for the timer triggered action to be performed (this action updates the progress bar).
    Additionally I havent been able to capture the transfered bytes from the upload. Maybe I'm using the wrong elements?
    How could I achieve this. Has anyone done it?
    I would really appreciate all the help I could get.
    Homer Vargas

    Hi,
    Can anyone please tell me the way to upload file from client system to server.
    The code i have is as follows:-
    Jsp:-
    function saveImage(){
         //projectname.javafilename
         var strStatus = "save";
         document.saveImageForm.action="/irj/servlet/prt/portal/prtroot/TestXML.TextImageLink?frmstatus="+ strStatus;
         document.saveImageForm.method="post";
         document.saveImageForm.submit();     
    <form name="saveImageForm" encrypt="multipart/form-data">
    <table width="388" cellpadding="1" cellspacing="1" bgcolor="#F0F0F0" border='0'>
           <tr>
                 <td><font color="blue" face="verdana" size="2">IMAGE:</font></td><td><input id="image" type="file" name="image" value=""/></td>
         </tr>
    <tr>
         <td><input type="submit" name="submit" value="Submit" onclick="saveImage();"/></td>
         </tr>
    </table>
    </form>
    now i am not getting what to write in java file
    using IPortalComponentRequest.
    Using the jsp file upload in tomcat is working but here it is not working
    please help meee
    Thanks in Advance
    Regards
    Sirisha

  • Need to use progress bar in my application

    hello friends,
    Actually i m using jsp filedownload and I am gettting my file in byte array and need to implement a progress bar while downloading file (as IE showing in status bar downloading file size ..% of total file size)...no fake progress bars and no stop gap solutions as like a gif moving with sign "plz wait ..file is downloading "
    plz help how to get this done
    My code
    HashMap result = (HashMap)request.getAttribute("requestParams");
         String type = request.getParameter("type");
         boolean isFile = false;
              if(result != null){
              String successFlag = (String) result.get("");
              String sFileName = null;
              byte[] bFile = null;
              String sContentType = null;
              if(successFlag != null && successFlag.equals("true")){
                   for(int i=0;i<result.size();i++){
                        sFileName = (String) result.get("FILENAME");
                        bFile = (byte[]) result.get("FILEDATA");
                        sContentType = (String) result.get("CONTENTTYPE");
                   response.reset();
                   if(null!=bFile) {
                        if(bFile.length>0){
                             if(sContentType == null || sContentType.equals("")){
                                  response.setContentType( "application/octet-stream" );
                             else response.setContentType(sContentType);
                             response.setHeader("Accept-Ranges", "bytes");
                             isFile = true;
                             response.setHeader("Content-Length", Integer.toString(bFile.length, 10));
                             if(null!=sFileName){
                                  if("view".equals(type)){
                                       if(null!=sFileName)response.setHeader("Content-Disposition","inline; filename=\""+sFileName+"\"");
                                  else{
                                       response.setHeader("Content-Disposition","attachment; filename=\""+sFileName+"\"");
                             ServletOutputStream outs = response.getOutputStream();
                             if(null!=bFile)outs.write(bFile);
                             outs.flush();
                             outs.close();
                             out.clear();
                             out = pageContext.pushBody();
                                       }

    You should get your keyboard fixed. There's a lot of letters missing from what you type and it makes it very hard for other people to read. It looks extremely inelegant.
    Anyway, your JSP isn't in control of the download. (You shouldn't have all that Java code in a JSP either but that's a separate issue.) All it does is to send the data to the browser, which is in charge of the download. And in all the browsers I use, there's a box which tells you how far the download has proceeded. No real need for a progress bar, even if you could persuade the browser to make one. Which you can't.

  • Progress bars in JTable, is it possible?

    Hello. We are currently making an applet giving the user the progress information of his/her downloads. I need to use JTable for this because each client can download/upload more than one file at the same time.
    We are targetting an interface similar to Kazaa wherein a progress bar is visible on the row of the downloading item. Therefore, I need to incorporate a small progress bar in a cell in the JTable. Is this possible? How?
    I hope someone could help me out on this. I am very new to Swing and Applets (I used mostly JSP with my programs).
    Many thanks in advance. =)

    How to use Progress Bars:
    http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html

  • Jni using progress bar problem

    Hi
    i am new in jni application actually my project is j2ee(servlet,jsp) based. In my one of project module we need to call vb ocx for large processing in background so it is time taking and my framwork is pure mvc based so how i have to show
    progress bar please give me some idea....
    Thanks in advance and sorry for english
    ni

    There's no solution to that in the JNI or Java side of things. If the VB has control, only the VB knows what its progress is, so only the VB can display it. So change it to do that.

  • Create progress bar

    Hi. Do you know how to create a progress bar ?
    In my JSP, i'm going to show some numbers and a progress bar telling the user how many % of a job (s)he has done. I'm doing a regular refresh and getting the %-number from a backend-method.
    I'll be very thankful getting some advice.

    This is just one of those posts that is just asking for some sarcastic remarks... I'll pass this time.
    Advice about what? Only post here if you have a problem you can't solve yourself. If you check the other posts, another one about this very same topic has some replies, I suggest checking it out.

  • Progress Bar after clicking a link

    Hi,
    I would lilke to add a progress bar after clicking a link from the end user interface. I know we have to use onClick property to do this, I found a Java script code which generates a progress bar and included that java script code in the onClick property value but for some reason the java script is not executing.
    Can anybody please tell what I am missing?
    If anybody did this before, please give any thoughts and if possible with any sample code is highly appreciated.
    Thanks in advance.

    I found some info in the forum and did the following.
    Created a js function and copied it to includes folder and added that js function (e.g. myprogress) in the commonScripts.jsp file. In the form filed option for onClick called the java script function like this..
    <Property name='onClick' value='javascript:myprogress()'/>
    also tried with..
    <Property name='onClick' value='myprogress()'/>
    For some reason the java script function is not executing at all.
    I don't understand what I am missing, can anybody give some thoughts.
    Please help.
    Thanks in advance.

  • IE progress bar continues after Request is completed

    I have an iPlanet J2EE Struts web application running in a 6.0.280 IE Browser. I have a JSP page that when submitted, the request is 100% successfully completed. I get the standard "Done" message on the browser bar, the IE globe is not active, and the web page properly displays the expected results. However, the IE progress bar continues to increase up to a point, indicating that more processing is expected or still waiting for a response. That�s the issue. There are 2 JSP�s that make-up this web page. One is an outer page which contains links and filtering options and the other is an inner frame which contains the data on which the submit will act. Although it may not be enough to illustrate this issue, below is a snippet of the both JSP�s. Any suggestions would be appreciated:
    Segment of Main JSP code:
    ( The Javascript method submitDoUpdate() is invoked when the user clicks a �submit� link.)
    This method resides in the outer page(main frame/page)
    * Submit update
    function submitDoUpdate(){
    top.main_frame.innerFrame.document.myForm.submit();
    The submit will POST the form using the following from the InnerPage(innerFrame/page) and invoke the Struts Action listed.
    <FORM NAME=" myForm " action="myAction.do" method="POST">

    maybe it's doing something else? are there images in your page?

  • Dynamic hierarchy/Progress bar

    Hi all,
    I need to develop a progress bar at the footer of each Web page that shows the end user, the hierarchy of the pages.
    I have the following hierarchy
    page1.jsp --> Page2.jsp---> Page3.jsp
    Page4.jsp--> Page5.jsp--> Page3.jsp
    Now how do I derive my hierarchy bar dynamically in Page 3, based on whether it is Page 2 or Page 5 that is callign Page3?

    My_Home_Page wrote:
    I thought of assigning the form's name or id (anything that is unique to that Page) in a hidden variable and pass the hidden variable to the other pages. Is that what you meant? or do you a have better solution?
    Note: Im a beginner in JSP and hence need to get things explained more clearly.That is a good solution as long as you only use forms to move from one page to the next (perhaps that is the best answer because it requires the least upkeep).
    If you only care about the last page the user visited, though, every request that comes from another page will have a "Referer" header (misspelling and all) that informs you of the last page.
    So you could use
    String lastPage = request.getHeader("Referer");
      if (lastPage != null) {
        if (lastPage.contains("Page2.jsp") { /* then you know it is Page1.jsp -> Page2.jsp -> Page3.jsp */ }
        if (lastPage.contains("Page5.jsp") { /* then you know it is Page4.jsp -> Page5.jsp -> Page3.jsp */ }
    }

  • Code to trigger action once progress bar finishes or window disappears

    Hi all,
    I'm somewhat new to Xcode and I was wondering if anyone knew if it was possible to create an application that interacts with another running application in the form of performing a task once a progress bar completes in the second app. or a window disappears.
    thank you,
    Kyle

    Your code snippet doesn't show any progress bar.
    Anyway, if the one works in the one browser and not in the other browser, then this is definitely a problem with a client side language and NOT with a server side language such as Java/JSP.
    Doublecheck the cross browser compatibility of your HTML, CSS and Javascript code.

Maybe you are looking for

  • Osx lion hangs when installing

    Downloaded osx Lion yesterday and tried to install it on macbook pro 15" bought in Jan, and the progress bar hangs at the start and stayed all night without installation, although i have updated to the latest Snow Leopard etc...and followed all the s

  • Request Approval using OIM API

    Hi all Which API I need to use to approve a resouce request using OIM API? I have tried with the following: tcReqOp.setRequestResponse(85, 1 , "java.lang.String psResponse"); i do not know what to pass in place of java.lang.String psResponse. I aslo

  • IN clause help

    Hello, Could someone please give me an example of how to handle the following with a IN clause: IN ('Jim O'Grady', 'Vinny D'Esponosso') The ' in the last name is causing problems in my where clause. Any help would be greatly appreciated. Thanks, Tim

  • Central SLD vs SLD for each XI instance

    We are starting our SAP XI project.  We are on XI 3.0 sp 9.  We are trying to make a decision on which of the SLD configurations is the best for our company.  We will have 3 SAP XI systems (dev, qa and Prd)  should each have an SLD or should their be

  • My first sync: my contacts with outlook  2007 (xp in my work)...

    and other datas in my home with windows 7. Any tips? What about different libraries? I need to install itunes in my work as well? Tks in advance.