How to restrict the user for re-submitting the same form

Hi All,
I would like to know, How to restrict a user for re-submitting the same page.
I have a jsp page with submit button... and should not allow the user to save the same data again ..
Anil

Try the followings. If user disable cookies, this will not work. You need to modify to detect such situation!
String processed = "mycooke";
Cookie[] cookies = request.getCookies();
Cookie c = null;
if (cookies!=null) {
   for (int i=0; i < cookies.length; i++) {
       if (cookies.getName.equals(processed)) {
c = cookies[i];
break;
if (c!=null) {
// already processed.
// send error message and exit.
// set cookie;
c = new Cookie(processed , "yourdata");
c.setMaxAge(-1);
response.addCookie(c);
// process as it is the first;

Similar Messages

  • How to restrict end user from modifying/saving the workbook?

    <Moderator Message: As you deleted my comment in this thread by editing it again, I am locking it now>
    Hi,
    We have created few workbooks. The requirement is that the end user should not be able to modify or save the workbook. We tried using S_RS_Tools authorization object with "themes" in the Command ID. But this does not seem to solve our problem. Please suggest whether it is possible to enter any other value in this field to restrict access to the end user.
    We also tried including the following authorization objects with the corresponding values :
    1.S_GUI with the value Activity=60(import)
    2.S_USER_AGR with Activity = 03 and * in Role.
    3.S_BDS_DS with Activity = 03(display) and 30 ; Class Type = OT.
    4. S_USER_TCD with tcode = RRMX.
    But still the end user is able to modify the workbooks. (The end user must not be able to make changes to settings of any of the buttons in the design mode, must not be able to save the workbook).
    Please suggest the corrections required. Also kindly suggest if there are any other ways to resolve this issue <removed by moderator>.
    Your help is appreciated.
    Thanks.
    Edited by: Siegfried Szameitat on Nov 26, 2008 12:55 PM
    Edited by: suresh naidu on Nov 26, 2008 1:19 PM
    Edited by: Siegfried Szameitat on Nov 26, 2008 1:23 PM

    Hi,
    Only few people have authorization to create S.O. w.r.t. quotation (as in our case, sales ppl create quotation and Finance ppl create S.0., with reference to Quotation Only - T.Code: VTAA).
    Others have only authorization to View/ Display, VA03.
    Consult your Basis-Admin, he will create appropriate role & assign T. Code: va03 for list of user, provided by you.
    Best Regards,
    Amit.
    Note: You can't restrict anyone with T. Code: VA02, to change qty or price in Sales order, directly.

  • How to restrict a user for the other plant orders In CATS

    Hi
    We are using CATS for entering labour hours in PM orders. While entering the time in CAT2 first we will select the personal number of the employee and the order number in which he has worked .
    My question is while entering the order number if we worgly entered the other plant order number it should give error message saying that order number not belong to other plant.
    How can we restrict this .At present it is accepting the other palnt orders
    Thanks in advance
    Gangadhar

    Hi,
    You have to add some more fields in CAT2 this will serve your purpose.
    Text for Plant etc .
    Regards,
    Kapil Kaushal

  • How to restrict the user(Schema) from deleting the data from a table

    Hi All,
    I have scenario here.
    I want to know how to restrict a user(Schema) from deleting the values from a table created in the same schema.
    Below is the example.
    I have created a table employee in abc schema which has two values.
    EMPLOYEE
    ABC
    XYZ
    In the above scenario the abc user can only fire select query on the EMPLOYEE table.
    SELECT * FROM EMPLOYEE;
    He should not be able to use any other DML commands on that table.
    If he uses then Insufficient privileges error should be thrown.
    Can anyone please help me out on this.

    Hi,
    kumar0828 wrote:
    Hi Frank,
    Thanks for the reply.
    Can you please elaborate on how to add policies for a table for just firing a select DML statement on table.See the SQL Packages and Types manual first. It has examples. You can also search the web for examples. This is sometimes called "Virtual Private Database" or VPD.
    If you have problems, post a specific question here. Include CREATE TABLE and INSERT statements to create a table as it exists before the policies go into effect, the PL/SQL code to create the policies, and additonal DML statements that will be affected by the policies. Show what the table should contain after each of those DML statements.
    Always say which version of Oracle you're using. Confirm that you have Enterprise Edition.
    See the forum FAQ {message:id=9360002}
    The basic idea behind row-level security is that it generates a string that is automatically added to SELECT and/or DML statement WHERE clauses. For example, if user ABC is only allowed to query a table on Sunday, then you might write a function that returns the string
    USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'So whenever any user says
    SELECT  *
    FROM    table_x
    ;what actually runs is:
    SELECT  *
    FROM    table_x
    WHERE   USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'
    ;If you want to prevent any user from deleting rows, then the policy function can return just this string
    0 = 1Then, if somone says
    DELETE  employee
    ;what actually gets run is
    DELETE  employee
    WHERE   0 = 1
    ;No error will be raised, but no rows will be deleted.
    Once again, it would be simpler, more efficient, more robust and easier to maintain if you just created the table in a different schema, and not give DELETE privileges.
    Edited by: Frank Kulash on Nov 2, 2012 10:26 AM
    I just saw the previous response, which makes some additional good points (e.g., a user can always TRUNCATE his own tables). ALso, if user ABC applies a security policy to the table, then user ABC can also remove the policy, so if you really want to prevent user ABC from deleting rows, no matter how hard the user tries, then you need to create the policies in a different schema. If you're creating things in a different schema, then you might as well create the table in a different schema.

  • How to config the user and role in the runtime for executing in the GP?....

    Hi Experts,
    I am learning GP(Guided processor)according the document
    http://help.sap.com/saphelp_nw70/helpdata/en/44/0d5b8f250d5cfae10000000a155369/frameset.htmneed.
    I meet two question when I learn the GP.
    The first:
    This document don't tell me how to config the member framework of the company.  After I design the GP, I have to config the user and role in the runtime for executing. I hope I can use the WDA(webdynpro for java or webdynpro for java) to implement to config the user for executing in the runtime. Thus, the customer don't config the user when runing the GP. But I don't know how to do this.
    I need a document guide step by step to tell me how to do this.
    The second:
    If I use the workflow in the GP, I have to install and config the NWDI(Netweaver Development Infrastructure). Now I have installed the NWDI, but I don't know config it so that I can download it to my machine for develop the workfolw in the GP.
    Do you give me some hints? Thanks a lot.
    Thank a lot.
    Best regards,
    tao

    Hi, Mithu,
    Thanks a lot for your help in advance.
    I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
    Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
    I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP.   I don't know how to do this. 
    Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
    Do you give me some hints? Thanks a lot.  My email: [email protected]
    Thanks again.
    Thanks & Regards,
    Tao

  • Dipalying message to the user to update to the latest version of the flash player.

    Hi all,
    In my latest application I am using flex functionality which
    is supported only in the latest version of the flash player. So my
    task here would be to display a message to the user for upgrading
    to the latest version of the Flash Player. I have tried working on
    it but didn't find any solution.
    Anybody who has worked on the similar issue can please help
    me out.
    Thanks in advance.

    In Menu, Project, Properties, Flex Compiler, ensure "Use
    Express Install" is checked, and FB will generate this code for
    you.
    Tracy

  • How to restrict a user group of SQ01 for only execution for some users

    Hi,
       I would like to know if it is possible to restrict the access to SQ01 transaction for some users. I would like that these users have only execution access to some queries associated with an user group.
       Do I have to associate the user group to the users I want to have access to it? How can I do it=
       Do I have to associate the queries created on SQ01 to the users? or it is enough to assign the users to the user group where the queries are defined?
       Do I have to associate the infosets created on SQ02 to the users? or it is enough to assign the users to the user group to which the infosets are associated?
       Thank you,
       Luz D.

    I suggest you do a web search on SQ01 and SQ02. That'll bring along SQ03 as well.
    There's so much information available on the web that there's no reason to repeat it here.
    [try google|http://www.google.com/search?hl=en&safe=off&q=SAPsq01sq02&meta=]
    Jurjen

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • How to Restrict printing the document using IRM for a Single Document?Allow printing for some documents and restrict the printing for particular documents in same document library?

    Can we able to Configure the IRM in Document Level in SharePoint Document libraries?
    The document library contains multiple document sets , Can we restrict the printing according to document sets? Allow printing for some documents and restrict the printing for particular documents in same document library
     Is this possible?Please suggest.

    Yes, that can be done. But note that all administrators will have the same right to print, so you need to make sure the users are not administrators. You can include a macro to disable printing, but if the users disable macro, they can print the documents.
    Hence, there is no foolproof way to prevent printing documents. If you still need a foolproof security, PDF format provides password based security (viewing doesn't require a password) that can be implemented to prevent the document from printing,
    which doesn't require any special scripts and is tough.
    You can have a look at the following links:
    http://msdn.microsoft.com/en-us/library/office/ms458245(v=office.14).aspx
    http://msgroups.net/microsoft.public.word.docmanagement/prevent-printing-of-docum/91353
    http://www.go4sharepoint.com/Forum/prevent-printing-saving-documents-10150.aspx
    The following link explains about the security features in PDF. This is for information purpose only and not for promotion of any products:
    http://www.pdflib.com/knowledge-base/pdf-security/
    Balaji Kundalam

  • How to get the User entered value in the Submit request form for a parameter of a concurrent program in Oracle applications.

    Hi All,
    I have a requirement where i need to get the user entered value in the Parameter of a concurrent program while submitting it. i tried to query the FND_CONCURRENT_REQUESTS table but in that it stores the ID values from the value set of the Parameter.
    After submitting the Concurrent request when we click on the view Details button it opens a form where it displays the arguments in the parameter field .  i want to get that string.
    Thanks a lot in advance for your time and help.
    - Vijay

    Hi All,
    I have a requirement where i need to get the user entered value in the Parameter of a concurrent program while submitting it. i tried to query the FND_CONCURRENT_REQUESTS table but in that it stores the ID values from the value set of the Parameter.
    After submitting the Concurrent request when we click on the view Details button it opens a form where it displays the arguments in the parameter field .  i want to get that string.
    Thanks a lot in advance for your time and help.
    - Vijay

  • On the web how can I check the user role to display the form suitable for this role i

    Hello
    How can I check on the web the use role to display the a form for each role
    Example
    If the admin login I display admin_form.fmb and if user login I display
    user_form.fmb
    Thankx
    Tamer

    In my forms I hide tab pages according the role using something like the following script in the WHEN_NEW_FORM_INSTANCE trigger.
    So the user can not navigate to tabs which are vorbiden by his role.
    CURSOR users_roles_cur IS SELECT granted_role FROM user_role_privs
    WHERE username=(SELECT user FROM dual);
    user_roles_rec users_roles_cur%ROWTYPE;
    IF users_roles_cur%ISOPEN
    THEN
    CLOSE users_roles_cur;
    END IF;
    OPEN users_roles_cur;
    LOOP
    FETCH users_roles_cur INTO user_roles_rec;
    EXIT WHEN users_roles_cur%NOTFOUND;
    MESSAGE (user_roles_rec.granted_role);
    PAUSE;
    IF RTRIM(user_roles_rec.granted_role,' ') = 'BLA-BLA'
    THEN
    tb_pg_id := FIND_TAB_PAGE('activity');
    IF GET_TAB_PAGE_PROPERTY(tb_pg_id, visible) = 'FALSE' THEN
    SET_TAB_PAGE_PROPERTY(tb_pg_id, visible, property_true);
    END IF;
    END IF;
    END LOOP;
    CLOSE users_roles_cur;
    Other solution may be is to use an initial form which only will detect the user role and run the appropriate form.
    Other solutions are also possible.
    Joseph

  • How to get data from the user for an Insert Trigger ?

    Hi all and thanks in advance, I need to get some values from the user for a child table when a row inserted into the parent table, is that possible to use ampersand inside an "Insert Trigger" to let the user for inserting some values ?
    Edited by: user9942078 on 17-Dec-2008 16:35

    In a different words,
    When a virus attacked your body your blood cells instantly goes into operation. Just like that -> your trigger activated as a result of your DB operation on objects. So, here also you have no option to manually intervene anything.
    Hmm... Looks like some science fiction movies ultimately pays some price... ;)
    So, trigger basically fires implicitly as a result of any database operation on objects or even on user.
    So, that has to be automatic. And, when you are using & it will ask for some input value - which cannot be done in case of triggers.
    For details please refer the oracle docs.
    Regards.
    Satyaki De.

  • How to restrict some users from viewing a screen of standard transaction

    Hi All,
    I need to restrict certain user ids from viewing the 'Payment Transactions' screen for the below mentioned transactions.
    FK01, FK02, FK03, MK01, MK02, MK03, XK01, XK02, XK03
    The Basis consultant has tried to configure it. However its not working. So need to find other solution.
    For all transactions other than FK01, MK01, XK01 (create vendor), the BAdi GOS_SRV_SELECT is called before the payment transaction screen appears. But for transactions FK01, MK01and XK0, no such BAdi is there.
    Also I'm not able to figure out how to restrict that particular screen using Badi GOS_SRV_SELECT. What will be the service name for this?
    Please help !!!
    Thanks in advance,
    Radhika

    hi,
    u can do this using user exits.
    identify the appropriate exit for ur transaction and thn put condition like
    if username = ...
    loop at screen.
    hide..
    endloop.
    i was just trying to give u some hint .make it to ur best.
    reward if hlpful.

  • How to restrict a user to login twice

    hei evryone!
    Here's my prob... I need to restrict a user to login more than once meaning, if a certain user account is currently login , that account cannot be used concurrently using another window or machine... If another user attempts to login, using that same account an error message will be displayed saying "this user account is already logged in".. i tried to do this in javascript but the code that i've got only works for IE and its kinda hard to capture the event for closing window.. plus using onunload is not advisable with my situation since my webpage can be redirected to other codes meaning the cause of unloading the page could either be closing the browser or redirecting the window to another page such as window.location="anothercode.jsp";... I was wondering if there's a way to do this in jsp...
    Any suggestions, ideas, or sample codes would be deeply appreciated. Thanks in advance!
    btw, i need to generate a code that is cross browser.. What i really need to accomplish is to be able to determine when the browser is closed either by clicking the X button on the window, alt f4 or my own close button and not when the page is unloaded.
    Here's a sample code : This only works in IE =(
    ---------- default.jsp-------------------------
    <html>
    <head>
    <script language="Javascript">
         onunload=function(e) {      
         winX = navigator.appName=="Microsoft Internet Explorer" ? window.event.clientX : e.screenX;
         winY =navigator.appName=="Microsoft Internet Explorer" ? window.event.clientY :e.screenY;
    if (winX<0 && winY<0)
              // redirect to logout.jsp n do some stuff
    </script>
    </head>
    <body>
    Logout
    List
    View Schedules
    </body>
    </html>
    the default screen would be the code above: "default.jsp" wherein there are many ways that the page
    can be unloaded such as :
    - clicking the logout link
    - click the View Schedules
    - click the x button the left side of the window
    - alt f4
    - if the window is minimized , right click then select close option
    Now, what i needed to do is to determined when the browser is closed so i reset the login flag of the account and can be used later on.

    hei everyone!
    im tryin to resolve this prob by adding a session id field on the users table. Everytime a user logs in i will update the session id field so that if anyone attempts to use the same account i will redirect the later into the login page with a warning msg. I'll do this by comparing the session id that u got from the dbase and the session id from request.getSessionId() of the browser. However, my prolem now is how to cleanup my database.. i need the cleanup coz i have a user tracking screen wherein i cud show who's account are login n who's not. I have created an applet and embed it in all of jsp files so that i cud catch the event for closing window whether by using the x button of the window or a power intrerruption. However, i need to find a way where i cud determine whether the event was really a close window or just a redirection from another page. I mean , you could leave the page either by viewing another screen or by actually closing the window.. For instance, my main page has main menu which are (1) View Users and (2) View Schedule .By default, im in the "View Users" screen . These two menus have their corresponding jsp n both jsp files have an embeded applet. So if the user click the "View Schedules " screen or if the user chooses to click the logout button or window's x button to exit the browser, then the applet will call the stop method. This what i meant by how will i determine if the user really exits on my application or not.. Coz if the user clicks from one screen to another then, user actually does not leave my application the user only exit on my application if the user logs out or close the window..
    Please help me out on this matter... Thanks in advance!

  • Restrict Standard User from not removing the COM-Addins registered under HKLM with Admin rights.

    Hello,
    I have developed a COM-Addin for word 2013 by VS 2013 and installed it under the HKLM with Admin rights. Now from an non-admin account, ie Standard User I'm able to uncheck that addin from the COM-Addins dialog and remove it also. Previously I have done the
    same thing for word 2007 addins and if a non-admin user tries to uncheck it the warning "The
    connected state of Office Add-ins registered in HKEY_LOCAL_MACHINE cannot be changed" pops
    up. But this is not happening for office 2013 apps(basically word, excel and powerpoint). 
    This is happening for all Add-Ins installed under HKLM.
    How can a Standard User be restricted from unchecking and removing the Office Addins registered under HKEY_LOCAL_MACHINE with same warning "The
    connected state of Office Add-ins registered in HKEY_LOCAL_MACHINE cannot be changed" in
    a pop-up box?
    Regards, Sayan

    Hi,
    The behavior is changed since Office 2010. Office 2010 and Office 2013 allows a standard user to turn a per-machine add-in off by unchecking the add-in in the COM Add-ins dialog.
    To restrict Standard User from not removing the COM Add-ins, we can try to add the add-in to
    the Group Policy option: List of managed add-ins in the Office Group Policy template.
    Word for example, the policy is under:
    User Configuration\Administrative Templates\Microsoft Word 2013\Miscellaneous
    To enable this policy setting, provide the following information for each add-in:
    In "Value name", specify the programmatic identifier (ProgID) for COM add-ins, or specify the file name of Word add-ins.
    To obtain the ProgID for an add-in, use Registry Editor on the client computer where the add-in is installed to locate key names under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins.
    To obtain the file name of an add-in, click the File menu in the application where the add-in is installed. Click Options, click Add-ins, and then use the Location column to determine the file name of the add-in.
    In "Value," specify the value as follows:
    To specify that an add-in is always enabled, type 1.
    Hope this helps.
    Regards,
    Steve Fan
    TechNet Community Support

Maybe you are looking for

  • User Exit - Purchase Order Create - Payment Exceeded

    Hello All, When i will to save the PO, i need to check payment budget. I'm using the User Exit MM06E005/EXIT_SAPMM06E_012. But when the error is about payment budget exceeded, the message is displayed before the program enter in the user exit. So, i

  • Oracle declare function in shell script

    Please tell me oracle declare function now able to run in shell script? I am calling in shell script like @/myscript.sql it is not working properly, reset update and other oracle command is working fine in shell script.

  • Add field in customer partner function tab (XDnn)

    Dear all, I know that it is possible to add some specific fields in XDnn transaction, but I would like to add a field in the partner function tab in the customer master data. We can see : partner function, number, name, description and I would like t

  • Postings during MIRO reversal

    Hi Gurus, I have created a PO with account assignment (GL). *During MIGO entries are:* Acct  Assignemnt(GL)   + GR/IR                         - *During MIRO:* GR/IR                        + Vendor                       - But during MIRO reversal via

  • How to install Bangla language ?

    I have nokia 311.but it can not support Bangla language. Now i want to install Bangla language without going Nokia Care.But how ? Help me...please......(signhnsk , where are you ?)