Problem in refreshing page after role assignment

My requirement is that as soon as the user logs in, a role should be assigned to him dynamically followed by refreshing of the browser window post which the role should be visible on Top Level Navigation.
I've implemented it using JSPDynpage.
I am able to assign the role. The refreshing of the browser is done through JSP using top.location.reload();
The problem that I'm facing is that as the user logs in, the browser just goes on refreshing infinitely.
Any pointers on that?

Hi,
To avoid refresh calls in a loop, you should set some flag in session params to break the loop.
So as you load the JSPDynpage, check the flag in session and set a if condition to run reload or not.
Regards,
Praveen Gudapati

Similar Messages

  • Can not refresh page after save properly(When not saving master record)

    I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
    In some use case I have Address as master table and Person as detail table
    For some business reason I need to don't save same addresses
    eg:
    If +1 Test St+ is in database already and new user coming and adding this address with new person
    I need to use the row in database not creating a new address
    I do saving in doDML method of Address with some hashing algorithm and it is fine
    My problem is that I can not refresh page after save properly
    User coming to page think Adding a new address and a new person but in fact no new
    address added because of business I describe above
    Any ideas how I can implement this?
    Appreciate that
    Regards
    Mohsen

    Hi,
    from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
    Frank

  • Best way to refresh page after returning from task flow?

    Hello -
    (Using jdev 11g release 1)
    What is the best way to refresh data in a page after navigating to and returning from a task flow with an isolated data control scope where that data is changed and commited to the database?
    I have 2 bounded task flows: list-records-tf and edit-record-tf
    Both use page fragments
    list-records-tf has a list.jsff fragment and a task flow call to edit-record-tf
    The list.jsff page has a table of records that a user can click on and a button which, when pressed, will pass control to the edit-record-tf call. (There are also set property listeners on the button to set values in the request that are used as parameters to edit-record-tf.)
    The edit-record-tf always begins a new transaction and does not share data controls with the calling task flow. It consists of an application module call to set up the model according to the parameters passed in (edit record X or create new record Y or...etc.), a page fragment with a form to allow users to edit the record, and 2 different task flow returns for saving/cancelling the transaction.
    Back to the question - when I change a record in the edit page, the changes do not show up on the list page until I requery the data set. What is the best way to get the list page to refresh itself automatically upon return from the edit-record-tf?
    (If I ran the edit task flow in a popup dialog I could just use the return listener on the command component that launched the popup. But I don't want to run this in a dialog.)
    Thank you for reading my question.

    What if you have the bean which has refresh method as TF param? Call that method after you save the data. or use contextual event.

  • Refreshing Page after PL/SQL Process Completes

    Reader's Digest Condensed Version: I have been unsuccessful searching the forum for a method to Refresh the current page AFTER the execution of a PL/SQL Process defined on the same page.
    War & Peace Version: I have a page which displays multiple records for editing on P1001. I also utilize a checkbox in combination with a button to perform some intermittent steps. Essentially, the user selects a row to "clone" by checking the appropriate checkbox and clicking the "clone" button. The first thing the button executes is a JavaScript function on page P1001, which calls a popup window (P1010) so the user can select a new value for the primary key. This is required to maintain data integrity of course and avoid duplicate records. Page P1010, contains two text fields with Popup links for each. The user can either enter their values directly, or use the link which will calls another JavaScript function to call a popup page P2 to display the results of an SQL query. Once the user makes their selections, another JavaScript function on P1010 passes back the selected values and stores them in hidden variables on P1001. At this point, I want my PL/SQL process, CLONE_RECORD, to execute examining the values from the record to-be-cloned and the new primary key values. The PL/SQL checks the database to see if the record already exists. If it does not, then validation of the data occcurs and a SQL insert string (myInsertSQL) is generated. I then "execute immediate myInsertSQL;" and "commit;" from within my PL/SQL. The procedure terminates, and at this point I want the original page P1001 to refresh. If the insert was successful, the new cloned record should be displayed along with the other previously displayed records.
    I am having issues with the timing because I am able to insert the cloned record into the database, but I have to manually refresh my page to see the resulting new record. I know that PL/SQL is executed on the server and that JavaScript is executed at the browser, but how can I synchronize my process, or at least perform an HTML POST(?) to refresh the page at the end of my PL/SQL procedure?
    As always, any assistance is greatly appreciated.
    MovingTarget
    PS. I am using HTMLDB 2.0 so please be kind.

    MovingTarget,
    Before I get into this I want to make sure you understand that in general, unless it's a really long process, you want the submitting page to have an On Submit process that calls your PL/SQL process. Then you can provide a branch back to the same page if you like or to any other page for that matter. Also, the PL/SQL error handling in ApEx is not too great right now but there are plans to improve it in the next version. In the mean time you have to use some tricks if you want to display "pretty" messages on exceptions.
    I'll tell you how I would approach this and let you tell me why it would not work or what I'm not getting...
    You have a main page, that in order to submit, needs a pk value populated from a popup (pu1), which in turn calls another popup (pu2). I'll create an imaginary situation in which I might have the same pages... I'm populating a users table (legacy) with a pk that is a combination of the employee's dept and name. The pu1 shows departments and pu2 shows emps in those departments.
    So, I click "add new user", then click on a button that opens pu1. I see the departments and then click on another button that opens pu2 to see the names. I click on a name and user JavaScript to close the popups and populate and item on the parent page with a string that is made from the employees department and name. NOW I click "save". The page submits and calls a PL/SQL process that passes in the values from the parent page to the INSERT process. After the process is run a branch redirects the user back to the same page and displays the success message from the PL/SQL process.
    I hope that didn't just make things worse! lol
    Dan

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

  • Refresh page after execute event

    Hi all, I have a question, please help.
    I have a button on the view SOHOverView(BT115H_SLSO) to change the status.
    *** part of code of event ***
    CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
         EXPORTING
           objnr               = objnr
           user_status         = estat
         EXCEPTIONS
           object_not_found    = 1
           status_inconsistent = 2
           status_not_allowed  = 3
           OTHERS              = 4.
       "WAIT UP TO 1 SECONDS.
       IF sy-subrc <> 0.
         CASE sy-subrc.
           WHEN 1. message = 'object_not_found'.
           WHEN 2. message = 'status_inconsistent'.
           WHEN 3. message = 'status_not_allowed'.
         ENDCASE.
       ELSE.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             wait = abap_true.
       ENDIF.
    this code is executed and changes the state correctly, but to see the change you have to re-open the document. I need to refresh the page and the user can see the new status immediately.

    Hi Rudy,
    you can acheive this by reverting the bol buffer.
    Afte the FM call 'BAPI_TRANSACTION_COMMIT', check sy-subrc. If it is ZERO, execute the below code else not.
    * Read header Entity
      lr_ent ?= me->typed_context->your context node name->collection_wrapper->get_current( ).
    * get Transaction
      lr_trans ?= lr_ent->get_transaction( ).
    * Revert all changes
      lr_trans->revert( ).
    As you have already commited changes using 'BAPI_TRANSACTION_COMMIT'. Now revert will only bring the changes from the database again and will not affect your status changes which you made recently.
    Please let me know, if you have any issues.
    Regards,
    Jotsaroop Singh

  • Problem with "Next Page" And "Zoom" in CrystalReportViewer With VS 2010

    Hello,
    i am using crystal report v 13 sp1 with visual studio 2010,
    As mebtioned, the next page and the zoom is not working in my report, whiwh has as data source "Stored Procedure"
    This is my code, and i think it's correct, i was using this code in previous versions of crystal report (cr10) and it worked fine,
    When i used the Data set , the next page and zoom worked fine, but with stored procedure it doesn't work,
    Note: when i open the Tree of Data on the left, then click on the next page or the zoom, it become funtional, it's very weird,
    protected void *Page_Init*(object sender, EventArgs e)
    if (!IsPostBack)
    reportDocument = (ReportDocument)this.Page.Session ["_reportDocument"];
    if (reportDocument != null)
    string rptFile = reportDocument.FileName.Split('
    ', '/').Last();
    LoadReportRessource(reportDocument);
    TableLogOnInfo log = new TableLogOnInfo();
    ConnectionStringSettings conn = WebConfigurationManager.ConnectionStrings[0]; //la premiere connectionstring
    SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(conn.ConnectionString);
    log.ConnectionInfo.ServerName = SConn.DataSource;
    log.ConnectionInfo.DatabaseName = SConn.InitialCatalog;
    log.ConnectionInfo.UserID = SConn.UserID;
    log.ConnectionInfo.Password = SConn.Password;
    log.ConnectionInfo.Type = ConnectionInfoType.SQL;
    for (int i = 0; i < reportDocument.Database.Tables.Count; i++)
    reportDocument.Database.Tables.ApplyLogOnInfo(log);
    for (int i = 0; i < CrystalReportViewer1.LogOnInfo.Count; i++)
    CrystalReportViewer1.LogOnInfo.ConnectionInfo = log.ConnectionInfo;
    CrystalReportViewer1.ParameterFieldInfo = (ParameterFields)this.Page.Session ["_paramFields"];
    CrystalReportViewer1.ReportSource = reportDocument;
    CrystalReportViewer1.DataBind();
    CrystalReportViewer1.ShowFirstPage();
    else
    CrystalReportViewer1.ReportSource = (ReportDocument)this.Page.Session ["_reportDocument"] ;
    Edited by: Soumaya on Sep 7, 2011 6:16 PM

    @Don:
    Sorry, but i donno what do you mean by "what is the App Pool running in 32 or 64 bit?",
    i am running the application locally, ( the IIS is installed locally ),
    as i told you, my OS is 64bit,
    And yes i tried a very simple report, with just one field , and the "next button" is also not working,
    Its only not working with stored procedure, in the others methods ( push or pull method is working fine)
    i think its a problem in refreshing page, because when i open the tree on the left, then click on next page or zoom, its works fine
    @Ludek:
    i changed my code as below, and it doesn't solve my problem:
            ReportDocument reportDocument;
            protected void Page_Init(object sender, EventArgs e)
                if (!IsPostBack)
                    reportDocument = (ReportDocument)this.Page.Session["_reportDocument"];
                    if (reportDocument != null)
                        string rptFile = reportDocument.FileName.Split('
    ', '/').Last();
                            TableLogOnInfo log = new TableLogOnInfo();
                            ConnectionStringSettings conn = WebConfigurationManager.ConnectionStrings[0];
                            SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(conn.ConnectionString);
                            log.ConnectionInfo.ServerName = SConn.DataSource;
                            log.ConnectionInfo.DatabaseName = SConn.InitialCatalog;
                            log.ConnectionInfo.UserID = SConn.UserID;
                            log.ConnectionInfo.Password = SConn.Password;
                            log.ConnectionInfo.Type = ConnectionInfoType.SQL;
                            for (int i = 0; i < reportDocument.Database.Tables.Count; i++)
                                reportDocument.Database.Tables<i>.ApplyLogOnInfo(log);
                        this.Page.Session["_reportDocument"] = reportDocument;
                        CrystalReportViewer1.ParameterFieldInfo = (ParameterFields)this.Page.Session["_paramFields"];
                        CrystalReportViewer1.ReportSource = reportDocument;
                        CrystalReportViewer1.ShowFirstPage();
                else
                    CrystalReportViewer1.ReportSource = this.Page.Session["_reportDocument"];
    Edited by: Soumaya on Sep 8, 2011 10:39 AM

  • Role info not appearing once role assignment request is submitted from UI

    Hi Everyone,
    We have a strange problem in our project in IDM 7.2 SP8 where IDM role concept is used which contains privileges (could be role/profile) of backend systems.
    Usually when ever a role (i.e IDM role) assignment request is submitted from UI, the activity with the associated info (like user details, role details, audit ID) should be stored in MXI_LINK table from where the info will be fetched and used in next stages of the processing
    Even though the information is getting available for most of the cases for all users but some times for few users once the role assignment request is initiated from UI there is no info is getting available in MXI_LINK table corresponding to this activity which is strange.
    Because of this problem even though user submits role assignment request no role info getting passed to IDM, set to pending state for the user which is getting meaning of user not submitted any role assignment request at all.
    Can any one suggest what are the things that gets involved between these two steps and any troubleshooting hints are highly appreciable.
    Regards,
    Venkata Bavirisetty

    Is this a situation you recreate at will? In other words, is it always happening on the same users? If so, you could put a trace on that user's account then try to add the role and see what that trace log shows. Additionally, you could just follow the links in the chain of the various tasks that kick off when you do a role assignment and check each task / job's job log and see what that tells you. There's got to be an error somewhere along the way that's preventing this from executing properly.

  • "No records found" in many pages after CVS synchronization

    Hi...
    We have a very servere problem with UIX pages after synchronizing changes using CVS. We work in a 7 persons team anda every night we perform a synchronization in order to begin the day allways with the same project.
    Unfurtunately we have found that many UIX pages made by our team mates can only be displayed correctly in the PC where that page was created. Eventhoug we all have the same files. We found that the person who created the pages can see them without a problem, but everyone else only see a "No records found" message in the page (this is when there are uix "read only tables" in the page).
    We have all the entity objects in a package named "entity" and the view objects in one named "vo". So the xml file that rules thes objects are called "entity.xml" and "vo.xml". We all have exactly the same files (including the application module java and xml files) after the synchronization, and also know that in order to the app works fine we all have to add all "UIModel" configuration files in the ViewController project.
    We also have tried using exactly the same ViewController.jpr and Model.jpr files that exist in the machine where it all works fine and the results are the same (the "no records found message" inside the tables).
    Is there any known reason for this behaivor???
    Are there other important files that we are missing in order to synchronize correctly???
    I hope somebody can help us...
    Thanks in advance...

    Hi ,
    Did you check-in and import into development and consolidation tabs?.If you already import ,they should appear.Did you define below standard scs as dependencies to SC in the created track?
    APJTECHS - 7.00 SP18
    SAPBUILDT - 7.00 SP18
    SAPJEE - 7.00 SP18
    BIUDI - 7.00 SP18
    BIMMR - 7.00 SP18
    SAPEU - 7.00 SP18
    SAP CAF - 7.00 SP18
    CAFKM/CAFMP - 7.00 SP18
    Regards,
    Koti Reddy

  • Business role assignment get lost

    Hello *,
    from time to time single users report logon problems due to missing business role assignment.
    In these cases business role was assigned via user in tx su01 directly. Whenever it happened the affected user itself is shown for last modifier of user record. But the users of course are not authorized to edit this data.
    We assume that maybe the personalization in web ui could be the reason but up to know the behaviour was not reproduceable.
    Does anyone know this issue?
    Kind regards
    Thomas

    Hi Thomas,
    Sorry but maybe I've explained myself poorly. You said that business roles that were missing are normally assigned directly in SU01. Then, in order to try to understand how they are remove, in SU01 transaction there is a functionality that allows you to see the change history for every add/removal of a role. This will tell you the user that performed the action and which tcode he used.
    Check this functionality that it's available as a menu option in SU01. Maybe it can give you some good clues about what's happening.
    Kind regards,
    Garcia

  • Refresh First page after returning from a framed pop-up window

    HI Can anyone help me on this technical problem.
    I have got one mainpage and from there i'm calling a popup with two frames (left, right). At frame right i'm populating the tableview.
    So when i submit(button) in tableview(right), the table contents has to be replicated in the first page and the popup has to be closed. So far it has be done successfully.
    The problem is when i return to the first page the page is not getting <b> refreshed automatically</b>. FYI, i'm not using mvc for performance reasons.
    So i need your help on how to refresh the first page, after control passes from popup.
    Here is the code, that calls the popup window
    winvar=window.open("organization.htm", 'main','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');

    Hi Craig & Raja,
    Let me tell thanks for your response. But your valuable solutions are not working for me. Please, check this code and please let me know that any thing went wrong.
    Here is the code
    My main page is progress.htm
    ============================
    <script language = "javascript">
        function openOrgTree(){      
           var winvar;
           winvar=window.open("organization.htm", '<b>Main</b>','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');
      </script>
    <htmlb:inputField id          = "InputOrgPlan"
                            showHelp    = "X"
                            onValueHelp = "javascript:openOrgTree()" />
          <% if application->i_desc is not initial.%>
          <htmlb:tableView id              = "tvX"
                           headerVisible   = "false"
                           design          = "alternating"
                           visibleRowCount = "3"
                           fillUpEmptyRows = "true"
                           columnWrapping  = "false"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "Text"
                           table           = "<%= application->i_desc %>"
                           iterator        = "<%= iterate %>" />
          <% endif. %>
          </td></tr>
    organization.htm (is the frames container)
    =========================================
      <!-- frames -->
    <frameset  rows="110%,*">
        <frameset  cols="40%,*" >
            <frame name="left" src="tree.htm" marginwidth="0" marginheight="0" scrolling="No" frameborder="0">
            <frame name="right" src="table.htm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
    table.htm (right frame)
    ==========================
       function callSubmit()
         alert(parent.window.name);  
    // displays the name as "<b>Main</b>" which i gave at the time opening oraganization.htm
    //        parent.window.opener.refresh();
    // window.opener.location.href = window.opener.location.href ;
             window.opener.refresh();
             parent.close(); // to close the popup
    // all of the above are not working
       </script>
      <htmlb:page onLoad = "callSubmit()">
    <htmlb:button id            = "submitbutton"
                        onClick       = "myButtonClick"
                        onClientClick = "callSubmit()"
                        width         = "10"
                        text          = "Submit" />
    i need onClick to populate the internal table and onClientClick to refresh the opener.
    if event->id = 'submitbutton'.
          refresh application->i_desc.
          application->i_desc = i_desc.
    Regards
    Swaroop

  • CUA issue; after roles are removed systems assigned to users remain?

    Hello,
    I've had this specific issue with CUA for some time, but haven't needed to try and resolve until now.
    The problem is this:
    - after security roles for a user have been removed for an entire system, in the system tab entries remain.
    - this results in the user account remaining in the child system, even though there are no security roles assigned.
    I have tried removing system entries once all roles are removed, however after saving the changes I see that the systems still exist.
    So, can anyone comment on why this happens? Is there an SAP note to resolve this?
    Appreciate the feedback.
    Paul

    Paul Vipond wrote:
    Thanks Julius.
    My intention is not to delete users. What I'm expecting to happen is that after I remove all the roles assigned to user for a specific child system, that user should not exist in the child system anymore.
    If you delete the system assignment for a child system, A deletion of the user in that system will happen.
    Paul Vipond wrote:
    This is the way it has worked for many child systems, but not all. For me it's specifically my production systems where a user account remains after all the roles have been removed.
    In dev/test systems I've removed all roles assigned to a user and after saving their account no longer exists in those dev/test systems.
    Make sense?
    If that is so, that is a bug in your dev/test system. I suggest to open an incident wiht SAP then.
    It should work like in a standalone system.... Removing all roles there will never lead to a deletion of that user!
    b.rgds, Bernhard

  • Problem in how to stop displaying previous page after Logout

    <%
    // I invalidate all my session when i logout and comes on Login.jsp page but if i go back still it open
    previous pages
    How i can stop these
    i am adding these line in avery jsp page
    1)
    response.setHeader("pragma","no-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", 0);
    response.setDateHeader("max-age", 0);
    response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); //IE5.x only;
    %>
    2) and in Logout.jsp
    response.sendRedirect("Login.jsp");
    session.invalidate();
    session.removeAttribute("viv");
    still on reaching login page i can move to previous page by clicking back button

    Hi sreenathreddy.
    I am doing exactly what you are talking about.
    On load of each jsp page, I check to see if I am still in session. If i am not, i redirect the user to the login page saying his session has expired.. This works perfectly fine in the sense that after I log out, if I directly type in the url or click on any other link from history, it redirects you to the login page.
    But my problem sitll remained that after logging out, if i clicked the back button, it would still take me to the previous page even though none of the links on that page would work.
    So i added all the response.SetHeaders that are mentioned in this discussion.
    Now the scenario is such that, when i press the back button after logging out, it tells me that the page has expired and i have to resubmit the form.
    There are two problems with this
    1. at this point , if i refresh my page, it still gets the details from the server and even though i am invalidating the session and all the user details, and checking to see if the session is invalidated,it still somehow manages to get all the details(i dont know where that info is stored)
    2. even if the person has not logged out. ie in the middle of a perfectly valid session and clicks on the back button, he is warned that the session has expired.
    please do reply
    thanks
    ritesh

  • Insert and then show the result and refresh page problem

    hi all,
    I collect the form value and put them into db, and then display this student 's inform out from db including the one we just submit, first I do it on this way
      insertpayment(UserId, FeeType, DuteDate, OfficerReason, OtherReason, CompleteDate,
                            InterviewDate, ApprovalDate,PaymentYear);
                   studentRecords= getFound(UserId);
                     userSession.setAttribute("studentRecords", studentRecords);
                     RequestDispatcher disp;
                   // disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/   studentRecords= getFound(UserId);");
                     disp = getServletContext().getRequestDispatcher("/showPayment");
                    disp.forward(req, res); then whenever I refresh my showRecords.jsp" I call the insert function. THAT IS HORRIABLE.
    I try to move the studentRecords= getFound(UserId); to my showPayment servlet and then forward the result to showRecords.jsp, but I alwarys get error
    PWC4011: Unable to set request character encoding to UTF-8 from context /report, because request parameters have already been read, or ServletRequest.getReader() has already been called
    How should I handle this kind of problem??

    Karan, thank you for the link, i read a few articles, I only get the sample part part use res.sendRedirect("/myfolder/showPayment"); in my insert servlet and use forward to display the page
    userSession.setAttribute("studentRecords", studentRecords);
                  RequestDispatcher disp;
                  disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/secure/admin/showRecords.jsp");
                   disp.forward(req, res);   
    this solute the refresh page problem, but bring the new problem I can't use the following way to disable the back button. not the perter solution
    maybe I did not understand PRC more advice!!
    response.setHeader("Cache-Control","no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
    response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility

  • Problems refreshing page with AJAX

    Hello,
    I have never used AJAX but today I decided to try it to improve my current implementation of a "processing" page that I use to display a waiting message and to check every 5 seconds if a response is available. If it is, the user is redirected to a "processing done" page.
    My previous implementation used the refresh tag provided by HTML in the "processing" page:
    <meta HTTP-EQUIV="Refresh" CONTENT="5; URL=<%=request.getContextPath()%>/main/CheckForResponse.do"/>
    Every 5 seconds a struts action is executed and the action itself will forward to the "processing done" page when a response is available.
    This solution works, however I don't like the refresh page effect, so I was trying to use AJAX instead. Now I put in the "processing" page the following script:
            function checkForResponse()
                var xmlHttp;
                try
                    // Firefox, Opera 8.0+, Safari
                    xmlHttp=new XMLHttpRequest();
                catch (e)
                    // Internet Explorer
                    try
                          xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
                    catch (e)
                        try
                            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
                        catch (e)
                            alert("Your browser does not support AJAX!");
                            return false;
                xmlHttp.open("GET","<%=request.getContextPath()%>/main/CheckForResponse.do",true);
                xmlHttp.send(null);
            }and I have the following html body tag.
    <body onLoad="setInterval('checkForResponse()',5000);">
    The function executes correctly and the struts action is also executed. However the problem is that for some reason the action doesn't forward to the "processing done" page. It does actually, if I debug, but nothing happens, the "waiting" page keeps being displayed.
    Does anyone have an idea about what I could be doing wrong? any suggestion?
    Thanks a lot!!

    Did you define the call back function correctly? like===
    xmlhttp.onreadystatechange = handleHttpEvent;
    function handleHttpEvent(){
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
                    // GO TO PROCESSING END PAGE
                } else {
                    window.alert("ERROR");
        }Also, you might want to check the progress bar application
    in bpcatalog -> http://bpcatalog.dev.java.net

Maybe you are looking for