Servlet - show message while getting data

Hello,
I have a servlet that is getting some data in form of an String from another server. This is taking some time, so I would like to show a "Please wait" message in between.
My problem is, that when I flush the message with my servlet and flush then the result of the query from the other server, the message is still visible.
So ist there a way to overwrite the first flushed output? Or some other way to show some short message before a result page?
Below is my code so far. I curently flush only the result without the message.
Thanks in advance!
package de.gfz.userinterface.httpclient;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
public class ClientPostServlet extends HttpServlet
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
    HttpClient httpClient = new HttpClient();
    //Url f�r den PostRequest setzen (kommt aus LoginWorkflow.xml Datei bei SCIENTIST)
    String url = String.valueOf(request.getAttribute("viewUri"));
    PostMethod postMethod = new PostMethod
         url
    //Attribute aus dem Request rausholen und als NameValuePair f�r den sp�teren Post Request setzen
    ArrayList<NameValuePair> postData = new ArrayList<NameValuePair>();
    Enumeration requestAttributeNames = request.getAttributeNames();
    while (requestAttributeNames.hasMoreElements())
         String requestAttributeName = (String) requestAttributeNames.nextElement();
         String attribut = String.valueOf(request.getAttribute(requestAttributeName));
         postData.add(new NameValuePair(requestAttributeName, attribut));
         //Attribute sicherheitshalber aus dem Request entfernen
         request.removeAttribute(requestAttributeName);
    //ArrayList in Array �bertragen
    NameValuePair[] postDataArray = new NameValuePair[postData.size()];
    for (int i = 0; i < postDataArray.length; i++)
          postDataArray[i] = postData.get(i);
     //the 2.0 beta1 version has a PostMethod.setRequestBody(NameValuePair[])
     //method, as addParameters is deprecated
    //Attribute in den Post Request setzen
    postMethod.setRequestBody(postDataArray);
    //Post Request senden
    httpClient.executeMethod(postMethod);
    //Ergebnis verarbeiten
    BufferedReader in = new BufferedReader(new InputStreamReader(postMethod.getResponseBodyAsStream()));
    String zeile = "";
    StringBuffer ergebnis = new StringBuffer();
    while ((zeile = in.readLine()) != null)
         ergebnis.append(zeile);
     //release the connection used by the method
    postMethod.releaseConnection();
    //String Buffer in String umwandeln
    String ergebnisString = ergebnis.toString();
    //css-Datei Position ver�ndern
    ergebnisString = ergebnisString.replaceFirst("AnzeigeModell/css/layout.css", "../css/layout.css");
    //display the response to the POST method
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print(ergebnisString);
    out.flush();
  public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    doPost(request,response);
  }

Hi,
Please do the consistency check on target ODS by using the transaction RSRV.
RSRV->Tests in Transaction RSRV ->All Elementary Tests ->ODS Objects -> double click on "Foreign Key Relationship of Reporting-Relevant ODS Object and SID Table Characteristics" and also on "Check the Status of the Generated Program of a Data Store Object ".
These two will be shifted to the right hand side.
Then expand the recently shifted checks and they will ask for ODS technical names. Provide the same and click on transfer. After giving in both, click execute. After successfull execution, try to load the data again. If this check fails, there would be a tab on the screen to correct the error "Correct Error".
Click on the same and it will correct the error and then load the data.
Hope this solves your problem...

Similar Messages

  • Error while getting data objects for instance

    Hello Expert,
    I am getting some weird error - whenever there is a new process is triggered and I check context Data, I get following error -
    "Error while getting data objects for instance processinstanceid"
    Thanks is advance
    Priya

    Hi Priya,
    this is a known issue in the xml processing of the Java Virtual Machine. Please refer to the SAP Note for this issue: 1949395
    This should solve your issue.
    Best regards,
    Stefan

  • Error Message While Saving Data : ORA-00372

    Hi,
    I am Getting this Error Message while Saving the data from frontend.
    ORA-00372: file 5 cannot be modified at this time
    ORA-01110: data file 5: '/db/d401/CHG_arsystem_01.dbf'
    Thanks.

    This might be the case when DBA is trying to make tablespce read only and some transaction is waiting for commit read only command is in hang state.
    Check with your DBA to know the datafile status.
    Dilipkumar Patel.

  • Error message while loading data from data mart

    Please can some one help on this.
    While loading data from one cube to another (I am actually creating a backup of original cube) for 1 record I am getting the error message " internal error occured with time split" The long text of error message says Message no. RSAU101

    Take a look at this thread:
    Internal error occured with time split
    Hope it helps,
    Gilad

  • Error message while doing data migration

    Hi all
    When im doing data migration for material master through Z transaction ,it is updating global DIR documents for material while doing this ,im getting the error and  the transaction is stopped intermediately the error message is CHANGE MASTER STATUS DOES NOT ALLOW CHANGES no error message number.
    Kindly sujjest where is that error is coming,it would be very helpful

    It seems you are using engineering change management and your change number's status is not proper (CC01, CC02, CC03; table AENR).
    Configuration of the status is in T419S (use SM30 + T419S) - but I guess the problem is about your change number not about config...
    How your Z-program is working, we don't know; contact the responsible functional/technical consultants.
    Edited by: Csaba Szommer on Aug 19, 2011 8:41 AM

  • Show message while page renders

    Hello everyone,
    After the logic for fetching data finishes,  i wish to show some 'Please Wait' meaasge on screen while the page renders.
    This is not an MVC model.
    How should I do this ?
    THanks

    Hi,
    neither use a javascript framework like jquery or extjs or have a look at xhtmlb:protectDoubleSubmit Extension.
    Regards,
    Stefan

  • Problem with data format while getting data from BI

    Hi,
    I am trying to build a universe for the development of Web I reports, the data source on which I am trying to build the universe is from BI.
    There is date field in the data, which is loaded in to BI as a date, but while I am building the universe over the cube I am getting it as a character.
    When I am trying to use that field in the Web I reports, I have a problem sorting the date column.

    hi ,
    when you run the webi report , click change query and in that go to yourt field properties and then chage its settings to date.
    I think I have done this of similar kind lontg back. But there is this property somewhere where we can change the type of the varaible and then you can see the expected resutls.
    Thanks ,
    Anjna

  • Show message while the method is running

    Hello,
    I'm having a really good problem.
    I've a server method, that is taking a good time to run, so i thougth i could show a pop up message to warn the user that the method is running.
    But, i can't use it by tag.
    Is there a way of showing it by code, ie with and actionListener, or something else?
    Thanks!
    Fernando.

    Try using 'af:poll' component on your page.
    You can send events to the server at fixed intervals and then evaluate the status.
    You will probably have to do some more logic on the server side to make this work correctly though.
    Good luck!
    --AJ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Producing a popup while getting data

    Hi all,
    I have an applet that communicates with a server for data. Now, when I click a button in my applet, I fetch some data from the server. During this period I need to popup a message saying something like "Processing request, please wait". how do i do this...

    oops, internal link, wouldn't work from outside.
    here is sun's one:
    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/ProgressMonitor.html

  • Short dump while loading data

    Hi All,
    I am getting this error message while loading data in BW. The eeror message is below:
    Data not received in PSA Table.
    Diagnosis
    Data has not been updated in PSA Table . The request is probably still running or there was a short dump.
    Procedure
    In the short dump overview in BW, look for the short dump that belongs to your data request. Make sure the correct date and time are specified in the selection screen.
    You can use the wizard to get to the short dump list, or follow the menu path "Environment -> Short dump -> In Data Warehouse".
    Removing errors
    Follow the instructions in the short dump.
    When I checked the short dump it is as below.
    ShrtText                                                                               
    An SQL error occurred when accessing a table.                                                                               
    What can you do?                                                                               
    Make a note of the actions and input which caused the error.                                                                               
    To resolve the problem, contact your SAP system administrator.                                                                               
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer termination messages, especially those beyond their normal deletion date.                                                                               
    How to correct the error                          
        Database error text........: "ORA-14400: inserted partition key does not map to any partition"         
        Internal call code.........: "[RSQL/INSR//BIC/B0000541000 ]"                                 
        Please check the entries in the system log (Transaction SM21).                                                                               
    You may able to find an interim solution to the problem in the SAP note system. If you have access to the note system yourself, use the following search criteria:                                                           
    How to correct the error                          
        Database error text........: "ORA-14400: inserted partition key does not map to any partition"       
        Internal call code.........: "[RSQL/INSR//BIC/B0000541000 ]"                                 
        Please check the entries in the system log (Transaction SM21).                               
        You may able to find an interim solution to the problem in the SAP note system. If you have access to the note system yourself, use the following search    
        "DBIF_RSQL_SQL_ERROR" CX_SY_OPEN_SQL_DBC                                                     
        "GP12DW003276UZE34XM7O2QXLER" or "GP12DW003276UZE34XM7O2QXLER"                               
        "INSERT_ODS"                                                                               
    Can someone suggest me what should I check?
    Thanks in advance.

    Thanks a lot Manga. I did what you told and it gave me this error message.
    Inconsistency: High value for table /BIC/B0000541000: 0002 ; PARTNO value in RSTSODS: 0022          
    So you mean to say once I click on correct error button, it should be good. So after that if do the loading, it should not give me this problem if I am right.
    But can you tell me what exactly does that error message mean? Also is this not an table space issue. I have to wait to correct that error as DBA is currently looking into it.
    Assigned points. Will assign more points if the issue resolves.

  • Not enough memory for Data Provider-Error while creating Data Source

    Hi,
    I am loading data into Master Data_Attribute InfoObject I am getting following error message while creating Data Source under "Proposal" Tab
    "Not enough memory for Data Provider"
    My Master Data InfoObject having 65 attributes
    My CSV file having 15,00000 records
    I am using BI 7.0 version
    If anybody faced this problem. Please share with me
    Thanks.

    Hi
    Here the problem with the space so plz contact ur BASIS people to increase the spae for particular object.

  • Error message while loading

    Dear Friends,
    i am getting error message while loading data in the cube, yesterday i got the same error message while loading ODS
    the error message is as follows:
    Value '差旅费 - ERIC BADEN - MEETING WITH E&Y & AYKIM     ' (hex. '5DEE65C58D390020002D002000450052004900430020004200') of charac.
    Thank you
    Mohammad Riaz

    Hi
    It seems that some updates were done on the source system side and whicle entering the value so character has been enetered which is not identifed by the Bw system.
    The data has to be corrected in the source system, you will have to confirm it with your client that what the data should be and for the tiem being you can load it till PSA and correct the data in PSA, and push it manually.
    Give the PSA details to your client, it will conatin the data in source system format, and they will know what value has to be changed.
    Hope this helps
    Regards
    Shilpa

  • CachedRowset Error Getting Date with Time

    We are using CachedRowSet and while getting Date from Oracle, it is missing the Time. i.e. It is just returning the Date and not the time.
    e.g. If the DB has 26-01-2005 10:00:00 it is returning just 26-01-2005 and not the time. It is all 0:0:0.
    What should be done in this case? Is this a bug or what?

    That's getTimestamp.Even tried that, but still getting time as 2005-02-09
    00:00:00.0, and where as in the DB it is 2/9/2005
    7:30:00 PMI simply cannot believe this to be true. But if indeed it is, then you have found a bug in Oracle's driver and would suggest you open a case with them to work out. One more thing to try though - what happens if you call getString instead? I don't know for sure if timestamp columns can be retrieved via getString, but if they can, what does it display? Also, are you sure you're getting the right row (correct query) and column versus what you're showing elsewhere (where you claim the DB shows 7:30:00 PM)? Are you getting the column via passing an integer, or a String column name, to the getTimestamp method? If an integer, maybe you're passing the wrong value (and therefor getting the wrong column value).

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • TS2634 My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What

    My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What can I do next since it doesn't give me even one clue as to what the error would be?

    Before I started to resync calendars one by one as suggested in the troubleshooting article, I remembered something that came up in a sync when I first attempted :  a 'which one do you want to keep' message about a repeating calendar event, which came up with three options, one from Calendar, and two from iCal on the phone.  I deleted that event, then went through the calendar resync one by one, and all seems OK now.
    In Music there is a way to find 'ghost' items that show up as grayed-out on the menus, so that you can try to reassociate or delete them.  It would be nice to have a similar way to work with Calendar!
    Thanks for pointing me to the right article.

Maybe you are looking for