Page Refresh Problem

hi all
In one jsp page i'm taking user entered data and passing it to another jsp page to save them in DB.After successfully inserting data into DB again forwarding to first jsp.
Now here if i press broswer refresh button or press F5 the same request is getting submitted and data is once again inserting into DB.
Please any one know the solution suggest me.

Here you have to distinguish between 'display' and 'save' actions. I am not sure how your implementation is. but if the request is handled by your controller (if you have one) based on an action, then when you display the results after save, your subsequent action should be back to display and NOT save, so that a refresh would only display the data again.
Not sure this helps you or not. But i would say always pass your requests to a controller (upon you on what is your controller - can even be a simple servlet) with an action and let the controller dispatch or redirect (based on your requirements) to the next page to be displayed. in that case your requests would be like ".../controller/save" & ".../controller/display". and when you refresh you just refresh the display action

Similar Messages

  • Animated gif and page refresh problem

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

  • Oracle Apex partial page refresh problem in IE

    Hi All,
    I'm using a button to refresh a region by enabling ppr .
    On click of the button , m redirecting to url and the url target is as follows
    javascript:jQuery('#VH_SCROLL_EMP88').trigger('apexrefresh');
    Its working fine in firefox and chrome but not in internet explorer. When I click the button in IE I just get the following
    [object Object] in the page
    When I click back button of browser I'm getting the original page
    Please help me to understand and rectify this
    Regards
    Sasidharan

    a) What version of IE are you using, this probably factors greatly in this question
    b) If you want to partially page refresh a region, it looks like you're using a sledgehammer when all you need is your clicking finger
    - can you create a dynamic action for your button that applies a 'refresh' action to your selected region

  • About Default Framework Desktop Inner Page refresh Problem

    In the Default Framework's Destktop Inner Page's Detail Navigation , When I click a link , It's refresh whole Desktop Innerpage page.
    Now I not require refresh whole Desktop innerpage . I'm only require it's refresh content page.
    How solve this problem?
    Thanks.

    Hi Yanjun,
    The behavior of a lot of features depends of the framework. Please check first the framework comparison document:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3050a9ef-2848-2a10-1e93-bcc432c00c84
    Also check isolation method of IViews, mainly URL isolation method (it may help you):
    http://help.sap.com/saphelp_nw70/helpdata/en/97/0be13dc2fd605ae10000000a11405a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/b5/8d977463334342be192228d2824fe1/content.htm
    Reward points if itu2019s helpful.

  • WebDypro Page refresh problem

    Hi Friends,
    I have a Layout viewset WebDynpro iView .
    When this iView is integrated and tested in Portal environment, one problem is faced.
    User clicks on Role> Workset>WebDynpro Page
    user tests the functionality and again clicks on Page link in order to see the pintail page screen, then this screen is not refreshed, the screen with previously entered values is displayed.
    How to refresh the WebDynpro iView Page screen on click of Page?

    Hai
    I have faced lot of problems for refreshing the page .
    but i solved it,use the following Code
    public static void wdDoModifyView(IPrivateTestView wdThis, IPrivateTestView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        when you enter in this area
        declare firstTime=true;
        if(firstTime) {
         "if you use the Container first you destroy all     children like below syntax"
    container.destroyAllChildren();        
    view.resetView();"
    Regards
    Dhinakar

  • Tab page refresh problem

    Hi,
    Forms Builder: 6.0.8.22
    Runtime version: 10gAS Rel 2 (Form developed in 6i and compiled and run on 10g)
    We have a form with multiple tabs based on single blocks.
    When i click on any tab other than first tab (i will call it as base tab), after sometime, control retuns to the base tab if there is no activity on that tab.
    There is no trigger or timer or delay used in this form.
    I am wondering how and why this is happening.
    Has anyone encountered this problem before ?
    Thanks
    AT

    And where is the focus after you have clicked on the new tab? In the page represented by the tab or the base tab?
    Additionally, are the pages real tabbed canvases or, as is common these days, stacked canvasses made to look like tabbed canvasses?
    (The reason for this is that a set of tabbed canvasses are loaded at startup as a set, potentially making loading take a long time while stacked canvasses are loaded as needed making the initial load time less while making navigating to the new stacked canvas take longer.)

  • Problem with defaul tabbed panel with page refresh

    Hi,
    I have a problem with my spry tabbed panels. The default tab
    is set to be the 1st tab, when I move to 2nd tab and navigate
    through the content, as the page refreshes, and before it is fully
    loaded it shows the content of the first tab for about 20 seconds
    or so....then the page finally goes to the desired content on the
    2nd tab....
    How can I make it so this does not happen and it looks like a
    smooth transition as I navigate through my pages?
    Thanks,
    Brandan98

    U add extra classNames to the tabs and specify the styles on
    the new classes
    example:
    <div class="TabbedPanels style1_panels" id="tp1">
    <ul class="TabbedPanelsTabGroup style1_group">
    <li class="TabbedPanelsTab style1_tab"
    tabindex="0">Tab 1</li>
    <li class="TabbedPanelsTab style1_tab"
    tabindex="0">Tab 2</li>
    <li class="TabbedPanelsTab style1_tab"
    tabindex="0">Tab 3</li>
    <li class="TabbedPanelsTab style1_tab"
    tabindex="0">Tab 4</li>
    </ul>
    <div class="TabbedPanelsContentGroup
    style1_contentgroup">
    <div class="TabbedPanelsContent style1_content">Tab 1
    Content</div>
    <div class="TabbedPanelsContent style1_content">Tab 2
    Content</div>
    <div class="TabbedPanelsContent style1_content">Tab 3
    Content</div>
    <div class="TabbedPanelsContent style1_content">Tab 4
    Content</div>
    </div>
    </div>
    <script language="JavaScript" type="text/javascript">
    var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab: 2
    </script>
    style1 beein the extra class ;)
    U can also.. specify other classnames in the constructor read
    more about this here:
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/tabbed_panels.html#options

  • Store data in R/3 without page refresh

    Dear BSP-Masterminds,
    we need to store data in R/3 without a recurrent page refresh. The problem is that our engineers are using PDA's and the page refresh is taking too much time. The engineers are changing equipment data on the PDA's. Every time they click on  save button, the data get send to the R/3 system and the checking, if the data are correct, takes up to 30 sec. Additional the new page refresh on PDA takes another 20 sec. It would be great to find a solution which stores the data somewhere and by hitting the 'final save-button' the data get checked and saved.
    The worst case scenario would be a table of around 600 equipment data, so it might be a huge table that has to be stored somewhere. I thought of a client side cookie but I have no experience if it is possible to store such a big internal table and by the way I don't know if this would be possible on a PDA.
    Every little hint is welcome!
    Regards
    Nicola
    P.S.: Please excuse any spelling mistakes )

    Hi,
    Javascript as such can't do it without refreshing the page. You need to use the AJAX function. But you don't need to be scared about it. Just look at the web logs I've mentioned and you'll understand it quickly.
    Here's an additional AJAX tutorial
    http://www.w3schools.com/ajax/default.asp
    Eddy
    PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

  • (Classic) Report losing pagination on partial page refresh - APEX feature request

    I have a page with both an Interactive Report and some classic Report regions.
    Based on user updates, there are many occasions where I need to do a partial page refresh.
    Thanks to plugin http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/refresh-interactive-report-1.0_361.html
    I'm able to refresh my IR, but not my classic report (unless I do a submit of the whole page) without losing pagination.
    Request: Will a Dynamic action 'Refresh without losing pagination' be part of future apex versions?
    Now, in apex 4.2, is there another work around available for classic reports?
    (I use 'submit page' now as action, but it's at least a second slower as a partial refresh, and because I need it on every user update, this second becomes a big addition to user frustration).
    Thanks, JP

    Here is the solution for your problem:
    https://apex.oracle.com/pls/apex/f?p=31517:243
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

  • How to retain value in LoV item in Tabular Form, after Page Refresh

    Hi,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, 2nd item(column) in tabular form, that LoV should get populated based on user's selection value in first item LoV.
    1. So how do I refer to the value, that user selected in first item's LoV? I will have to use this value as reference in LoV query of my 2nd item ( on this tabular form)
    2. Everytime I select value in first item LoV, page gets refreshed, as my requirement is to calculate 2nd item's LoV based on selected value in first item. So after this page refresh, first item LoV loses its value that was selected before the page refresh happened. So how do i retain this value in first item LoV? I have an unconditional process, that on every submit(refresh) of page, I set all my items with their corresponding values. But problem is what do i mention there to refer to this first item ( of type LoV) of tabular form?
    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).
    Please help.
    Thanks and Regards,
    Ravi.

    Hi Rave,
    You will have to use Javascript and Ajax to change the values as ApEx submissions will lose your results unless they are saved into the database.
    Remember, that as you are using a tabular form there will be lots of items called f01, fo2, fo3 etc on the page (one per row).
    Regards
    Michael
    Edited by: MKii on Jun 4, 2009 10:13 AM

  • Why does a box that says "uninstal set" keep popping up when i go to a new page, refresh the page, or ever open up the browser ever i upgraded to the new firefox?

    I upgraded to the newer version of firefox, and ever since then every time i go to a new page, refresh the page, or open it the interned a box pops up and says "uninstal set" and won't let me continue until i click "ok" why is this happening, and how can i fix it?

    go to Tools, add-ons, then only disable java 6.0.22 ONLY, then you have to click on restart. That solved my problem.

  • Event handler when using partial page refresh ?

    Hi
    I have a calendar, which uses partial page refresh. The problem is how to make javascript wait until the calendar has loaded and then do some updates on the calendar (after the user has pressed the next button that runs apex.widget.calendar.ajax_calendar('S','next');, for example ). I thought I could add "onreadystatechange" (or onload) event handler to the calendar like this: onreadystatechange="checkState()", where the function would check the state and if ready then do the updates. This doesn't work. Could somebody please tell me why not ?
    Tiina

    Hi,
    It seems that ajax calendar missing event apexafterrefresh.
    I do not know is this "bug" or just feature.
    That event would be useful to your case , if I understand correct what you looking for.
    For workaround , you can over write original function by placing this to calendar region footer
    <script>
    apex.widget.calendar.ajax_calendar=function(p_calendar_type, p_calendar_action, p_calendar_date, p_calendar_end_date){
    var l_cal_type_field = $v('p_cal_type_field_id');
    var l_cal_date_field = $v('p_cal_date_field_id');
    var l_cal_end_date_field = $v('p_cal_end_date_field_id');
    var l_cal_id = $v('p_calendar_id');
    var l_calendar_region = 'calendar' + l_cal_id;
    if ( p_calendar_type != 'C' ){
      $s(l_cal_date_field,$v('p_calendar_date'));
    }else{
      if ( $v(l_cal_date_field) == '' ) {
       $s(l_cal_date_field,$v('p_calendar_date'));
      if ( $v(l_cal_end_date_field) == '' ) {
       $s(l_cal_end_date_field,$v('p_calendar_end_date'));
    // create and apex.ajax.widget object
    var a = new apex.ajax.widget('calendar',function(){
      /* start the return function */
      if(p.readyState == 1){
       document.body.style.cursor = "wait";
      }else if(p.readyState == 2){
      }else if(p.readyState == 3){
      }else if(p.readyState == 4){
       $x(l_calendar_region).innerHTML = p.responseText ;
       $s(l_cal_date_field,$v('p_calendar_date'));
       if (p_calendar_type == 'C') $s(l_cal_end_date_field,$v('p_calendar_end_date'));
       document.body.style.cursor = "";
      /* DO HERE THINGS AFTER CALENDAR REFRESH */
      }else{return false;}
    // code for next,previous and today
    if (p_calendar_type == 'S'){
      p_calendar_type = $v('p_calendar_type');
    }else{
      $s(l_cal_type_field,p_calendar_type);
    a.ajax.addParam('p_widget_mod',p_calendar_type);
    a.ajax.addParam('p_widget_action',p_calendar_action);
    a.ajax.addParam('x01',l_cal_id);
    var lDate = (!!p_calendar_date && p_calendar_date !== '')?p_calendar_date:$v(l_cal_date_field);
    if (p_calendar_type == 'C') {
      var lendDate = (!!p_calendar_end_date && p_calendar_end_date !== '')?p_calendar_end_date:$v(l_cal_end_date_field);
    a.ajax.add(l_cal_date_field,lDate);
    if (p_calendar_type == 'C') a.ajax.add(l_cal_end_date_field,lendDate);
    a.ajax.addParam('x02',lDate);
    if (p_calendar_type == 'C') a.ajax.addParam('x05',lendDate);
    a.ajax.add(l_cal_type_field,p_calendar_type);
    a._get();
    </script>Where I have comment *"do here things after calendar refresh"*, you can hook own scripts.
    Of course this is not best way, but might help you till ajax calendar support dynamic actions fully
    Regards,
    Jari
    Edited by: jarola on Oct 20, 2010 3:11 PM

  • Help with retaining drop down data after page refresh

    Hello:
    Dev environment: JSP/Struts - Using DynaValidatorActionForm for ActionForm
    I have a JSP which, in a simplified version, uses two text boxes and one drop down viz. Name(text box), Country(drop down) and Country Name(text box).
    When the page is first brought up, obviously, the text boxes are empty and the drop down is at it's initial setting of "Select One" which has a value of 0.
    I enter a name, select "Other" from the drop down and click on Submit leaving the "Country Name" text box blank.
    Now, because of the validation I'm performing, if "Other" is selected, the name of the country should also be provided. In this case, obviously the validation fails and the same page is returned via "mapping.getInput()".
    Now the problem is, whatever I put in for "Name" is still retained but the drop down is reset to "Select One". This is causing confusion to the user because the error msg is misleading when it says, "Enter a country name", but in reality the user has to redo the drop down selection also.
    Anyway, is there a way I can make the drop down also retain the data it had prior to the page refresh just like the "Name" text box?
    Any help is greatly appreciated.
    Thanks.
    Here's the code from the "Action" where I do my validation check...
    -------- "Action" Code -----------------------------------------------
    if (tbi.getCountryid() == 10)
    if (tbi.getCountryName().equalsIgnoreCase(""))
    ActionErrors countryErrors = new ActionErrors();
    String errKey = "tbi.countrydata.invalid" + "." + (i+1);
    afflnErrors.add("Invalid Data", new ActionError(errKey));
    saveErrors(request, countryErrors);
    return new ActionForward (mapping.getInput());
    ------------------------------------------------------------------------------

    Are you populating that select box( from database) everytime page refreshes ?
    otherwise it should work as others.
    as a work around, here is a javascript code you can use to prepopulate a option in a select box, but you need to know what value was selected. ( may be set that value in request or session)
    call this function on load of the form.
    // list - is the name of the dropdown
    // selVal - is the value selected.
    function selectListItem(list, selVal) {
    for (i = 0; i < list.length; i++) {
            if (list.options.value == selVal) {
         list.options[i].selected = true;

  • Oracle 11g OMS: Database Instance Home Tab:  Page Refreshed Timezone Issue

    Hi all...I've searched the forums and search engines for specific information on this issue, but have not seen a viable solution so far. We have Oracle 11g Grid Control 11.1.0.1
    installed on a Solaris V490 using Solaris 10, with an Oracle 11.2.0.1 database.
    The Database instance Home tab for all 50+ databases shows the date and time of the 'Page Refreshed' in GMT. The OS and the Agent software both are configured
    with the TZ set to US/Eastern. All other page displays e.g. Performance, Availability for Data Guard Standby etc. all show the refreshed time in EDT, it is ONLY
    the Home tab for the instance that has the GMT format.
    I have not seen any threads or other information that describes specifically how to correct this or even to change it. There are many related posts about the Agent
    end.properties, the OS /etc/timezone configuration parameters, the TZ environment variable etc. but in my case they are all set properly.
    Does anyone have any additional ideas or suggestions or knowledge about how , or even whether, this can be resolved?
    Thanks!
    DPH

    sqlplus ... Connected to an idle instance.That means the database you're trying to connect with is offline, thus the:
    ORA-01034: ORACLE not availableNo big surprise there, instance (that you're trying to connect with) is offline.
    First, make sure the service OracleServiceXE for the database is running, see the services applet, Start/Run/services.msc and if it does not show "Started" hit the Start button with the OracleServiceXE selected.
    sqlplus sys/admin@XE as sysdbaThat connection attempt uses sqlnet to the XE tnsalias. If you're on the database host the ...@XE part is not needed, better to use:
    $ sqlplus /nolog
    connect /as sysdba;
    ... Connected. #if its running
    -- or use:
    $ sqlplus
    ... username: sys as sysdba
    ... password ...
    Connected.
    -- also try
    $ sqlplus system
    ... password: ....
    Connected.
    select name from v$database;
    ...That also assumes the environment/registry entries have been configured correctly.
    tnsping XE ... Attempting to contact [tnsalias connect details] ... OK (10 msec)That tells you the listener is running. It does not mean anything more than your listener is running at the host and port specified for your tnsalias are correct. It does not attempt an actual database connection. So if the database is offline but the listener is running a tnsping will not identify that particuler "problem".
    lsnrctl status ... Endpoints Summary ... PROTOCOL=tcp)(HOST=chilakamarthy)(PORT=1521)))...That bit of info also verifies the listener is running. Again, check your services.msc applet make sure the service shows Started.
    Edited by: clcarter on Jun 7, 2012 2:15 PM
    clarify tnsping

  • Std Page refresh issue

    Hi,
    On a standard page, I have added a column of itemtype link to a table through personalization, which shows status.
    On click of link, I'm calling a custom read only page (has its own custom AM and VO) in a new window. Its a simple readonly table with data from custom VO.
    Problem is after clicking on the link and new window opens, if i do any action on standard page, control goes to standard process request and std page gets refreshed.
    How can i avoid this, i dont want std page to be refreshed.
    In personalization, i have given link item's destination uri as
    OA.jsp?page=/xxx/oracle/apps/ar/irec/accountDetails/webui/xxstatusHistPG&invNum={@TrxNumber}&retainAM=Y
    I tried retainAM=N as well as removing that parameter but still same issue.
    Any help is greatly appreciated, Thanks!

    Hi Gustavo,
    There is partial page refresh on std page, in extended CO PR, I have added event on column amount (to do validation on tab out)
    as well as on select check box (it defaults rem amount into pay amount). For link, I'm opening new page by setting destination URL property in link item properties.
    I cannot code for parameter based pop-up as Im in 11.5.10 and using JDeveloper 9.0.3 (added screen behaviour below)
    Hi Shobhit,
    I tried the approach you suggested. Based on session parameter, Im controlling the code in std extended CO PR.
    It worked, I mean at least it doesn't error out now like before with navigation error. However it refreshes the page as control went to PR.
    I entered some amount in amount text field, and then clicked on "partially paid' link. it opens a custom page in new window.
    after that if i select any other record using check box, it goes to PR and refreshes the page. Is it possible to avoid this.
    Thanks
    Prabhu
    Its a payment screen, where i can pay multiple invoices. added select check box for the same. added below code on check box to capture event in PFR and default remaining amt to pay amount text field. i also have payment status link as column in the same table. on click of it i open a new custom window to show transaction details.
    if i select some invoices and modify amounts, and then if i click on status link just to see the status before clicking on pay button, this issue happens. as page refreshes on any action, all my modifications are gone.
    Select checkbox has been added using personlization and hence has to set set fire action in PR.
    Code in PR:
    Hashtable paramsWithBinds = new Hashtable(1);
    paramsWithBinds.put ("param", new OADataBoundValueFireActionURL(chkbox, "{$TrxNumber}"));
    chkbox.setFireActionForSubmit("selectPPR", null, paramsWithBinds,false, false);

Maybe you are looking for

  • Parsing a XML using Jdom --- Problem pls help

    Hi all, I am reposting it as I was told to format the code and send it again. I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" att

  • 3/19/2013 - Flash Player 11.7.700.146 Beta

    Flash Player Beta Channel Update Flash Player 11.7 builds are now available.  You can download Flash Player here: http://www.adobe.com/go/flashplayerbeta. Important Area for Testing Focus:  New Background Update Patch Mechanism This week's beta updat

  • String function in Oracle 9i to find part of string having two positions

    Hi, We need to extract the part of string having start and end position. Like Suppose the string is "TYPE ref_cur_type IS REF CURSOR" and need to extract name of the ref cursor i.e ref_cur_type.The length of the output is not fixed. But not able to e

  • Suggestion on using the variable index used in prompting the user

    import java.util.*; public class CaseOne { // main(): application entry point public static void main(String[] args) { //define necessary data structures (Step 1) int count = 5; // number of elements to average double value; // handle input double to

  • What happened to Fastcast?

    The Fastcast weather app for OSX and IOS was a great app. Suddenly, it's non-functional and no longer in the App Store. What gives?