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

Similar Messages

  • How to use TextField to add two numbers and show the result.

    hi everybody
    i would like to use JTextField to get addtion of two Numbers,
    for example i am trying to type any integer numbers in JTextField like 7
    and press JButton, called( +) to add anthor number like 7 and press JButton called(=) to get addtion fo
    7 + 7 = 14, at same JTextField.
    so there will be two buttons, one for (+),other for (=).
    i have implement ActionListener in (+) button ,to get Text from JTextField (with getText() method),
    now how do i use same getText() method to get the next number that i will add it with previous number in
    (+) button and get the result whenever i press (=).
    1-type integer number like (4) in TextField.
    2-press addition button(+) to get text by using getText() method and clear TextField.
    3-type anthor integer number like(6).
    4-press (=) button to get the number (6) by using getText() method, calculate 4 + 6 and show the result at same TextField (10).
    i hope it is so clear
    thank u in advance for any advice and suggestion.

    Use your first button to
    String x = JTField.getText();
    int y = Integer.parseInt(x);
    this will get your first value on your + button. Make sure you initialise the int beforehand incase nothing is put in (ie error prevention) then clear the JTField prob using setText(""). Repeat the process for the = button using different variables and add them normally and output the result.
    If your putting more than 1 arithmetic button on the GUI then you'll need to distinguish between them!!!

  • My phone keeps resetting and then shows the icon to plug into itunes but when i do itunes tells me that it can't connect to my phone because it has a passcode and wants me to unlock it to connect. My phone only gives me the option to make emergency calls.

    My phone started resetting today over and over and then shows the icon to plug into itunes. When I tried plugging in, a message pops up saying that itunes can't connect because my phone has a passcode and i need to unlock it to connect. my phone won't let me do anything more than make an emergency call. it wont give me the option to enter my passcode to unlock the phone. What can I do?

    After a visit to the apple store, they were able to get through my pass code but unfortunately I found out that is was a problem with the logic board. Since Apple only wants to sell and not fix, I was able to locate an iphone repair near me that deals with logic boards and they are currently working on it right now. i should be getting it back soon. Im not sure if the problem you are experiencing is the same as i went through but it does sound like it may be also a hardware issue and would suggest searching online for an iphone repair place that can diagnose what exactly is wrong. Hope this helps.

  • My ipod touch will not charge or register in itunes.  It keeps turning off and then showing the apple logo?

    My ipod touch will not charge or register in itunes.  It keeps turning off and then shows the apple logo.  I have tried holding down the button and plugging it in.  It will show the red battery for a second and then turn off?  Any other suggestions?

    I have checked for problems with the connections, but from what i can see with the naked eye, nothing appears abnormal. It is very strange, and very sudden. It just stopped in the middle of a charge. The apple store is my next step. I just wanted to see if anyone on here had some extremely eye-opening solution or check. thanks though!
    I'm also within warranty, so it's not a huge problem.

  • Execute a VO '4' times and show the result in single table at once.

    Hi,
    I want to execute single a VO query multiple times with different parameters and show the results together in a Table at once
    In Detail
    I have a table to which is associated with a VO.
    The VO contains SQL whose WhereClauseParameters need to be dynamically binded.say headerId and lineId
    Select ... from ....where headerId = :1 AND lineId = :2
    I have to pass these 4 values and show all the results in a single table
    headerId lineid
    H1 ............... L1
    H1 ............... L2
    H2 ............... L1
    H2 ............... L2
    I understand that i need to bind parameters dynamically and exceute the VO.
    As i have 4 different set of parameters, the view object will be executed 4 times.
    I want to show all the results together in a single table.
    How can I do it.
    thanks,
    Gowtam

    Hi Mani,
    Thanks a lot for the patience and detailed solution.I will try it out and tell you the status.
    Meanwhile, I have 2 questions on this solution(just curious)
    I will give you the snapshot of the table
    Table - ModelInfo
    Model......Tube..... Float....Size......Col5.....Col6.......Col7.......
    M1............T1.......... F1. .....1..........C15......C16.....C17.....
    M1............T1...........F1.......2..........C25......C26.....C27.....
    M1............T2......... .F2.......1..........C35......C36.....C37.....
    M1............T2...........F2.......2..........C45......C46.....C47.....
    M2............T1.......... F1. .....1..........
    M2.............T1..........F1.....2.........Cn5.......Cn6........Cn7
    .<continues...>
    .<till>
    .Mn............Tn..........Fn.......n........Cxy.......Cpq.......Crs....
    Question 1:
    if you notice this data,
    The Columns 5 to 7 are dependent on Combination of Model,Tube,Float and Size.
    Hence will this query work properly(without mixing up data from other Pk combination) and will it be efficient?(I Know this is a stupid qst, still double checking..As your solution assumes that each row is unique for Model only..which is not true)
    Select ...From....Where
    Model in(M1,M2,..Mn) AND Tube in(T1,T2..Tn) AND Float in(F1,F2,....Fn) and Size in(1,2...n).
    In short, will C15,C16 and C17 appear only with M1,T1,F1,1..I believe it will.
    Question 2:
    As I told,
    Third party program will return Array of Objects.
    Each object will have a variable called Flow along with
    Model,Tube,Float and Size.
    Flow is not stored in the database(can not be stored due to functional reasons).I want to show this Flow also along with other columns fetched from the DB for all 100+ rows.
    How can I do it?
    I will give u the scenario(with just 2 rows)...please check(Flow is not stored in DB)
    Third Party object : ObjModel
    Model......Tube..... Float....Size......Flow
    M1............T1.......... F1. .....1..........100
    M1............T1...........F2.......2...........200.
    M1............T2.......... F1.......1..........300
    M1............T2...........F2.......2..........400
    My concern is,
    After the VO executes and shows other 6 columns, it should show Flow appropriately.(associated with each object in the array)
    I understand that I need to have a Transient attribute in VO called[b] Flow.But I don't know how to perform the two tasks simultaneously..
    Task1:Your solution on showing table columns
    Task2:Showing Transient data for each object returned from program.
    thanks,
    Gowtam

  • I was watching something on my iPad then it suddenly turned off I put it in charge and it turned back on then showed the home screen then turns back off quickly so I can't restore it

    I was watching something on my iPad then it suddenly turned off I put it in charge and it turned back on then showed the home screen then turns back off quickly so I can't restore it

    Hi there iPad 3rd Generation,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    -Griff W. 

  • Adding  prompts dynamically and then send the results to users via email

    Hi,
    We have to schedule the reports for auto delivery to users at a specific time period. Please, tell me the mechanism to schedule them and how to assign prompt values to them. Currently, the reports are run by users by selecting prompts from the dashboard. If we schedule them, we will have to add some of these prompts dynamically and then send the results to users via email.
    Thanks in advance!

    Hi,
    I haven't tested it myself...but may be the following steps can help you.
    Fill some session variables depending on the the name of the user who logs in (this can be done easily be creating different session variables and put some executing order in it)
    Then you use these session variables as default values for your prompts. So the report will be executed making use of this default values.
    And by scheduling your ibot..you can send it by mail.
    I don't know if it's this what you're looking for...probably you have to base your prompt values depending on the users that are selected in your ibot?
    Hope it can help y ou in some way or another...
    KR,
    A

  • When we type a search item in firefox on my laptop then it shows the result then on second or third or more new search that is typing a new search it sticks to the first searched item

    when we type a search item in firefox on my laptop then it shows the result then on second or third or more new search that is typing a new search it sticks to the first searched one

    Tried that. Also tried SUPERAntiSpyware, ccleaner, HitmanPro. Removed anything that was reported. Problem persists.
    Chrome is also affected. But couldn't find any alternative way of not having Ask.com loaded as did in Firefox.
    Internet Explorer was initially affected. After the Ask.com search engine is removed that problem appears to have gone away.
    12/9/2014
    Interestingly, yesterday afternoon the Chrome browner new tab no longer hijacked by Ask.com. The symptom was there in the morning and had gone away in the late afternoon. Nothing was done except a few days ago I blocked everything on that page. The problem with Firefox continue to persist I didn't do the same blocking on it. I am going to try the same and then use anti-spyware to clear away all cookies and see what happens.

  • How to capture PLSQL package error and show the same in OAF Page.?

    Hi all,
    I am having the requirement to capture the error from a PL/SQL package and show the error in OAF page with meaning full error.
    Assume i am having the create and review page.
    The create page having the employeeLOV input field (non mandatory field).
    (i have the package which will check whether this LOV value is filled or not.. if not given then the user should be able to see a "understandable message.)
    to achieve the above scenario am following the below steps
    In my CO,
    with in try catch i called the am method which will invoke the XX_CUSTOM_PKG.
    so, from the catch it is giving me the message as shown below.
    try
    ((OAApplicationModule)localObject1).invokeMethod("insertData", personParam);--which will call the am method which in turn call the package.
    catch(Exception exception)
    throw new OAException("Review Error: "+ exception);
    Assume there are 2 possiblity of error inside this package one for Date field and another one for Employee field. we don't know which validation the user will encounter.
    For Employee field validation it is giving messag as below
    Review Error: oracle.apps.fnd.framework.OAException: Exception in insertData:java.sql.SQLException: ORA-20500: Employee field is required. ORA-06512: at "APPS.CUSTOM_UTIL_PKG", line 702 ORA-06512: at line 1
    for Date field as below.
    Review Error: oracle.apps.fnd.framework.OAException: Exception in insertData:java.sql.SQLException: ORA-20500: Date field should always greater than sysdate. ORA-06512: at "APPS.CUSTOM_UTIL_PKG", line 702 ORA-06512: at line 1
    But i need to display only the message "Employee field is required" or "Date field should always greater than sysdate" in the screen.. as information.
    Could you please help me to achive the above message? any sample code will be great help for me.
    Thanks,
    Thiru.
    Edited by: thiru_apps on Mar 13, 2012 11:13 AM

    try
    ((OAApplicationModule)localObject1).invokeMethod("insertData", personParam);--which will call the am method which in turn call the package.
    catch(Exception exception)
    //throw new OAException("Review Error: "+ exception);
    /*Try this code*/
    String exception = null;
    exception = exception.toString();
    if(exception.contains("Employee")){
    throw new OAException("Employee field is required");
    else if(exception.contains("Date")){
    throw new OAException("Date field should always greater than sysdate");
    else
    throw new OAException(exception.toString());
    I hope this might help
    Niranjana

  • Tried purchasing iTunes music. Put in my apple id and password then i was directed to a 'Terms and Conditions' page. I checked the box then clicked the 'accept' button next page read 'your Session has timed out '  try again  with a Done button to click on

    Tried purchasing music from the iTunes Store. When the window popped up I put in my apple id and password. Then I was directed to a 'Terms and Conditions' page. I checked the box next to the 'Yes I agree to these terms and conditions' - then clicked the 'accept' button next page read 'Your Session has timed out. Try again.'  with a 'Done' button to click on. Oh the same thing happens when i try to download  free iTunes. Yes I have tried & tried it again I even logged off and singed back in-- no joy 
    After accessing my iTunes account I was not able to change anything like my credit card number when I tried and was sent right to the 'Your session has timed out. Try again.'
    The last time I purchased any anything was on September 25th 2011 and the 'terms & conditions' page was last updated on October 12, 2011
    Does anyone have an idea to what is going on with my iTunes version 9.2.1 (5) and I can not upgrade to a higher version my iMac does not have the intel processor chip.Thank you for your time and help with this matter. You are greatly appreciated 

    I am having the same problem also! I posted on here about it, but no one has responded with ideas. I called technical support and e-mailed them, the only suggestions they gave was for the to turn off my firewall. But I didn't change anything, so it shouldn't suddenly stop working. Maybe this is just an iTunes issue? But it doesn't even recognize my account anymore, and I cannot log in now.
    If you happen to get an answer, will you please let me know what works for you?
    Thanks!

  • Can insert and html page inside a symbol

    How can I insert and html page in a symbol
    By example: One Menu with five options. When  click in option one: showme www.google.com; when click option two then show www.adobe.com...
    Sorry for my poor english.
    Thanks
    Now in spanish
    Buenos dias
    Quisiera saber si existe la posibilidad de visualizar una pagina web en un symbol, de manera que dependiendo de un menu, me muestre una dirección u otra.
    No se si esto es posible, porque soy muy novato en esto.
    Les ruego su ayuda.
    Gracias y saludos

    >thx for reply
    >i used Iframe anyway
    >btw im noob in html =.=
    Iframes are usually a terrible solution, in my opinion. If
    you need the background fixed, why not just set it to fixed rather
    than introducing fames and all of the problems they bring? Do you
    have a url?

  • Show the result of execution of a database procedure

    Hi everyone,
    I want to execute an oracle database procedure in oracle forms environment and show the result of execution to user(as "procedure executed successfully".. etc) How can I achieve this ?
    Thanks..

    That would depend on the implementation of your procedure. I would say if there is no exception thrown then the procedure completed successfully. Of course there might be some additional conditions when you consider your procedure run successful.
    So in the end you have to design your procedure so the caller can recognize if the procedure run successful or not. How you want to do this is up to you; you can use user defined exceptions (raise_application_error) if an error in your logic occurs which is not a default oracle exceptions, functions which return booleans or output stati.
    I for one prefer exceptions, as they force the caller to handle them (I add the user-defined exceptions thrown by each procedure in the specification right to the documentation so the one using my procedure sees it right away) and ensure my procedure is atomic.
    But as said this is entirely up to you.
    cheers

  • Showing the results window after termination

    Hi all,
    When I terminate my batch sequence execution in TS 4.0 using "RunState.Engine.TerminateAll()", it shows grayed-out windows and won't show the results window, even though it saves the results into an XML file on disk.
    Is there a way I can show the results window to the operator after the sequence is terminated?
    Many thanks,
    Chris
    Solved!
    Go to Solution.

    If you look in your model you will find a step called Read Entire Report.  This is just making an activex call to Report.Load.  This is what displays the report at the end of an execution.  If this does not get called no report will get loaded.  Since you are terminating then no report is getting loaded.  In fact if you don't have on the fly reporting on then the html files that make up each thread of a multithreaded batch run won't contain any data which will result in no report. 
    If you use the ProcessCleanup callback you should be able to load the report in there. 
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • TS1538 my 4th generation ipod touch is not recognize in itunes. it just displays the updating circle spinning then shows the apple then goes back to spinning. it is unusable now, what can I do

    MY DAUGHTERS IPOD TOUCH HAD NO AVAILABLE SPACE LEFT IN MEMORY SO WE TRIED TO CONNECT IT TO ITUNES TO SAVE PICS TO MY LAPTOP AND THEN UPDATE IT BUT ITUNES SAID IT DID NOT RECOGNIZE THIS DEVICE. SINCE THEN, IT IS ONLY DISPLAYING WHAT I WOULD SAY IS THE LOADING CIRCLE SPINNING AROUND AND AROUND THEN SHOWS THE APPLE LOGO FOR A SECOND THEN GOES BACK TO THE SPINNING CIRCLE. IT CANNOT CONNECT TO ITUNES NOW BECAUSE ITS LOCKED BUT WE CAN'T GET THE MAIN SCREEN TO OPEN IT WITH THE PASSWORD...PLEASE HELP

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

Maybe you are looking for

  • Sales/purchase register

    Dear Friends, Is there any report available for sales/purchase register.Already i tried with F.12 and S_ALR_87012357.But its not showing perfect report. Do we need to modify something for this ( may be in programming). Valuable suggestion is most app

  • Iphone Bluetooth Headset

    I just bought one maybe 2 weeks ago and the silly thing will not hold a charge, it says it's charged but when it is paired with my Iphone 3GS the battery icon shows less than a 1/4 charge on it........Whatsup with that? These things aren't cheap.....

  • Importing in 11g using Data Pump

    Trying to do something, looking for suggestions. I have a table that is 177 million rows (lets call it Table A), I extracted data out of this table which resulted in 12 million rows (lets call it Table A_Sub). What I am trying to do is use Datapump a

  • Market Risk Analyzer : JBRT_CFM ALM Simulation

    Business requirement : to make a interest income/expense budget/forecast for the next fiscal year and to evaluate the P&L impact of future changes in the debt / investment portfolio. Idea for solution : JBRT_CFM report (Net Interest income tab) Probl

  • Plug in Verizon phone (android) get VZW webpage

    I have my settings on my phone set as "charge only" when I plug in my android (htc incredible). However, I get automatically connected to the VZW website. The website seems to offer no checkboxes or any other ways to keep it from doing this. Can some