Avoid submitting form more than once

I would like to display an error if the user clicks twice on a submit button (payment is involved). The project requirements say no javascript. Any easy way to implement this in java ?

A few observations :
1)The solution(s) proposed are both valid, but may not work at all if the access to the session is not synchronized.
2)Even if you sync, the sync block only prevents the code from being executed by multiple threads within the same JVM, therefore your servlet might not operate properly if it's marked as distributed(Distributed servlets can run in multiple JVMs, so you're still exposed to race conditions), or if the servlet implements the now deprecated SingleThreadModel.
3)Keeping the tokens in session scope works well for small applications with low load, that only run on one machine, which does not require distributed session state.
4)It would be a better idea to use JSPs and custom tags, so you can re-use the solution quite easily in other apps.
5) While being overkill in most regular-sized apps, the use of entity beans with exclusive locking would be appropriate in big sites...

Similar Messages

  • Can you create a form in which its never possible for the same person te sign the form more than once.

    Hi, I've been looking into this for awhile and believe the answer is 'no' but was just wondering if anyone here would know of a solution.
    The company I work for has a formulier on which a number of Excel files are placed. This form is then sent to a five (often different) people who are then required to open the Excel files and if accord to place their digital signature. We would like to make sure that no one is able to sign the form more than once and also if possible to make sure they have opened the Excel files. It would be great if anyone had any tips...
    All the very best,
    Martin Angell

    I am not an Excel or Excel-to-PDF conversion expert, so I do not know how Excel forms are converted to PDF form fields. With this caveat here's what I do know.
    In Acrobat It is possible to create a PDF form in which there are JavaScripts associated with fields (any fields, including signature fields). These JavaSripts can do a lot of things, including checking the signer's certificates on the already signed signature fields. Then you can make all unsigned signature fields read-only, in which case the user will not be able to actually sign them. After that you can overlay a button field on top of each unsigned signature field with exactly the same dimensions and associate a JavaAcript with this button field. This JavaScript would put up an UI asking the user for the signing certificate and its password, check this certificate's CN against the list of already signed signature fields and initiate the signing of the unsigned signature field behind this button if your condition is satisfied.
    I never tried that myself but it could work. This looks complicated and it is but if you really want it you can try.

  • How to retrict user cannot open the same form more than once (Forms 6i)

    Our users always open the same forms more than once. For example the customer form, the user may access a customer record in the first form, however, he will open a new customer form to edit the same record, the result is he cannot save the record because the record is locked in the first customer form.
    How can I control the user cannot open the same form more than 1 time.
    Best Regards,
    Kane

    The customer form is only an example, I found there will cause a lot of problems is I cannot control the user from calling 1 program more than 1 than within application. Sometimes a user (not good in using computer) will overlap the form for many times.....
    Is there any simple way to do that?...can I have some PL/SQL statement or build-in functions that let me easily found our what forms the user has already opened, then I can control whether I let him open this form or not.
    Urgent...please
    Thanks

  • Unable to Run Form more than once!

    Hi,
    1. I create an oracle 10g Form
    2. I am trying to "Run Form" from within the Forms Builder. It runs OK.
    3. I close the IE, and try to "Run Form" again. It fails!
    My problem is that my form runs only the first time!!!
    However, If i try to run it manually by opening the IE and type: http://EH011W04G.greece.clb:8889/forms90/f90servlet?form=c:\myform.fmx&userid=lala/xaxa@orcl, it runs ok!
    I discovered that the problem is this:
    The first time i "Run Form" through Forms Builder, a file lets's say giorgos.htm is created in my Temp directory, and this file loads the form OK. The second time i "Run Form" through Forms Builder, a file giorgos.1htm is created and cannot load because it is not an html file!! If i rename it to giorgos1.htm it works ok!!!
    so... anybody can help me?
    thx for your time!

    Hello there, One Solution that i think is due to not closing the form application properly.If you happen to close the IE directly through the close button without exiting the FORM (with the Action => exit or through Exit_form ) then your forms instance keeps on running on the server and it only closed when timed out .That's why you are not able to run it again . but when you type the url itself it get loaded because it load the already running instance of the form so i'll suggest try to close it from Action=>exit and run again.
    Hope it will help you.

  • How do you fill out a form more than once from a single computer?

    URGENT QUESTION...
    I am using a FormsCentral form as a Job Interview form.  The interviewer needs to clear the form after each submission to fill the form out again for the next person interviewed.
    She tells me that she can't see how to clear the form to fill it out for the next interview, and I don't have the answer.  Would appreciate receiving that answer real fast, and the next interview will be at 11am EST today.
    Thanks.

    Randy,
    Answering your question about how I created the initial PDF form...
    I created it with the Employment Application template in FormsCentral, adding many additional questions to the template.  When I finished doing that, my recollection is that I clicked on “Save as PDF Form.”  And that worked fine. 
    The PDF form was then accessed by the interviewer without any problem.  She dutifully filled out the blanks, clicked on the SUBMIT button, and the first report then showed up as expected in FormsCentral under “My Forms.”
    We don’t particularly want to have this form online, although we can put it online if necessary.  Since there is only one interviewer who will be filling out this PDF form during the interview of each job applicant, our only issue is how to most easily clear the form after each interview is posted, without losing the SUBMIT button.
    Thanks,
    JS

  • Is it possible to open a form created with screen painter more than once?

    I have created a form with the screen painter. In the screen painter the form is assigned a FormUID. Probably because this is done, it is impossible to open the form more than once??
    Thanks,
    Kind regards

    Hi J.
    The answer is yes You just have to give your form a unique id.
    1) Give your form in screen painter a name like BTWO_DYNAMIC_UID (just plain text).
    2) Make sure your <i>FormType</i> and <i>appformnumber</i> have a unique number (i.e. 2000060001). You can do this in the xml source.
    3) By loading your document replace the BTWO_DYNAMIC_UID with an unique id. I have a counter that's a member of my class and increase that number to get a unique id (BTWO_F_1, BTWO_F_2 etc)
    I have added a code sample, SBOApplication is my SAP application object and mFormNumber is a member (integer) of my class.
    <i>Succes d'r mee, en als 't nie lukt hoor ik het wel... ;)</i>
    <b>Code (C#):</b>
    // New xml document
    XmlDocument oXmlDoc = new XmlDocument();
    private Form LoadUniqueForm(string AMyFile)
      // Define your path to
      sPath = @"Forms" + AMyFile;
      // Load the form
      oXmlDoc.Load(sPath);
      // Replace the string with an unique id
      mFormNumber++;
      string sXML = oXmlDoc.InnerXml.Replace("BTWO_DYNAMIC_UID", "BTWO_F_" + mFormNumber.ToString());
      // load the XML file in SAP
      SBOApplication.LoadBatchActions(ref sXML);
      // Return the form
      return SBOApplication.Forms.Item("BTWO_F_" + mFormNumber.ToString());

  • Round Trip form Preiemer to Audition more than Once

    Hoping someone can help.  I am struggling to work out how to send a project back to Audition more than once?  Basically I have a job that I sent from Premiere to Audition already but the client has come back with some further edits.  What I can't work out is how I can send that project back from Premiere to Audition for a second time once I have made the various edits requested Premiere so that I can just tidy up those bits back in audtion again.  At the moment it seems like I will have to try and re do all the work I had originally done in Audition or try and copy and paste clips form one Audition project to another and re align all the wave forms.
    I am sure I am being stupid and missing something really basic so if someone can shed any light on how I can do this that would be great.
    Thanks in advance.
    Mark

    Hi Alan
    Your right the files are there but all as separate wav files that were created when the Audition project was first created and I have the original Audition timeline that was created when I first sent the project back to Premiere. What I can't seem to figure out though is that when you send the project back from Premiere to Audition the new audio tracks that were created don't link back to the originally extracted wav files or the Audition Project that created them.  Instead Audition creates a new wav file for each complete track (for those tracks that came from Audition first time round).  However if you click on one of the single track clips from the original Audition to Premiere round trip and choose edit original it opens the original Audition project with all the clips in that created. Which isn't the behaviour I was expecting  I was hoping for something a bit like the dynamic link relationship between after effects and premiere so if you have round tripped your audio any further changes in premiere are reflected in the audition project or a copy of the audition project. Is there away of doing this?
    Thanks

  • Use Topic in TOC more than once...

    We have just purchased RoboHelp 6 for our Help System
    generation as well as to begin developing online training courses.
    I have a WebHelp File that contains 5 books - one book per
    procedure. I have a topic that is applicable to two procedures.
    Without having to make a copy of the topic, is it possible to set
    up the TOC to use the topic in question more than once?
    The problem arises when I am setting up the Browse Sequence.
    I tried to set up the Browse Sequence using the Auto-create using
    TOC...option, but the sequence appears to be in alphabetically
    order. In fact, it is in no way, shape or form even close to the
    TOC (as indicated in the Help - Topics in each browse sequence will
    be in the same order as in the TOC)!!!
    So, I tried to manually create the browse sequence. I used a
    browse sequence to contain all topics, then I set up another browse
    sequence to contain the duplicate topic. When I use the navigation
    arrows to move through the toc, it will not advance to the second
    browse sequnce.
    Any ideas or suggestions would be greatly appreciated. Thanks
    in advance.
    Lisa

    Hi LNT1
    The trick to all this is to never directly link from the TOC
    to the desired topic. Let's assume the TOC should have a topic
    appearing in two different places. In order to make this work, you
    link from two different redirect pages.
    Now if you generate WebHelp, I see where there could be an
    issue, because the browse sequence can only link from one topic to
    another. In other words, a topic can only have a single link to and
    a single link from it. So in this case, the redirect trick would
    fail. However, another trick comes to mind that may work. Instead
    of a Redirect page, you could have two different pages that instead
    of redirecting, contained an Inline Frame (IFRAME) that simply
    displayed the contents of the desired page. Basically, the pages
    containing the IFRAME would link properly and provide the desired
    effect.
    For more on IFRAMEs, download my Tips and Tricks file and
    scan it for how to create IFRAMES.
    Cheers... Rick

  • Calling thread.start() more than once concurrently

    Hi, I got a simple doubt that may feel awkward or absurd to people who are well versed in the java threading concepts. I just thought of it and as I couldn't get an easy answer I am posting this.
    Consider a class that implements the runnable interface. The run() method of the class is implemented with just a System.out.println(). If I make an instance of this class, say 't' in the main method and calling t.start() susequently twice or thrice; an illegal ThreadStateException will be thrown. The code snippet is as follows:
    ThreadTest t = new ThreadTest();
    t.start();
    t.start();
    It is understood that state of the thread object is changed to run state and so, if it is again started, it must be thrown. So if I put a Thread.sleep() inbetween these two subsequent calls assuming that the main method thread will be sleeping. So there is sufficient time for the first thread to terminate and then only the second will start - still the same exception is being thrown. I tried putting the synchronized qualifier for run too, still no effect - the same only happening. Why the java thread object is made in such a way that once the thread changes it state from Runnable to Running and then finally to dead state, it can be restated back to Runnable state, such that the start() method can be called again. Is it possible or not? Please post your comments.

    As ejp says you can't start a thread more than once - even if it has already terminated after the first start.
    By making threads a one-shot it simplifies reasoning about them: you don't have to wonder whether a second start() will work or not, depending on whether the thread has completed its first "incarnation". It also makes it easier to ensure thread resources are reclaimed. It also avoids semantic issues like whether anything about the thread is "carried over" across incarnations.
    This might seem a limitation but there are many ways around it - simply don't let the thread terminate. Whatever control structure you would enforce by re-starting the thread can be emulated without letting the thread terminate in between "executions".

  • Oracle.jbo.JboException: JBO-34010: The "adf/tabs/view/DataBindings.cpx" descriptor appears in the application classpath more than once:

    Hello
    We are using JDeveloper 11.1.1.6
    We have three 3 separate viewcontroller projects and one Master projects which i supposed to integrate all these projects into one.
    Issue:
    After putting all three together into the Master project, the app fails to deploy due to this error:
    oracle.jbo.JboException: JBO-34010: The "adf/tabs/view/DataBindings.cpx" descriptor appears in the application classpath more than once:
    We did some digging and found out that it is because of the fact that "DataBindings.cpx" in all three projects falls withing the default package. How do we rectify this issue. We cannot even Refector this file because that option is not available for this file. We have a demo soon, What can we do?
    Thanks...

    Hi,
    this error typically comes from name clashes. Apparently you created ADF libraries (or projects) that contain a DataBindings.cpx file. The DataBindings.cpx file seems to be located in the same folder structure and thus could not be merged but are found to be added twice. When you create new view controller projects then best practice is to ensure the root package name is unique to avoid such issues.
    Frank

  • Heading level hierarchy errors when topics are in TOC more than once

    I have discovered that the hierarchy in the Heading levels in
    the Printed Documentation will differ from than in my online help
    table of contents hierarchy, and that the problem is due to topics
    that are intentionally in the TOC more than once.
    For example, in chapter 5 of a particular help system the
    hierarchy should be:
    Heading 1 < Chapter 5 title from top-level book>
    Heading 2 <title of second level book>
    Heading 3 <title of topic that appears under second-level
    book>*
    What I actually get is:
    Heading 1 < Chapter title from top-level book>
    Heading 2 <title of second level book>
    Heading 4 <title of topic that appears under second-level
    book>*
    * This same topic appeared in an earlier chapter. In that
    chapter it was really at a Heading 4 level.
    Due to company styles, etc. we use a numbering system at the
    headings and in the TOC, so instead of
    5
    5.1
    5.1.1
    I erroneously get
    5
    5.1
    5.1.1.1
    This type of hierarchy issue appears multiple times in this
    particular document (which I inherited by the way.)
    Other than restructuring the document to not reuse topics in
    different places in the TOC, is there a solution or a workaround
    for this problem?
    What I am doing so far, is generating the Print Documentation
    one chapter at a time. As long as a topic is not reused with the
    same chapter, my hierarchy of heading levels is maintained;
    otherwise, it is not. Then I can put the chapters back together
    after fixing the few places that still have heading level problems.
    This however, will be quite cumbersome as this document is
    translated into nine other languages.
    I am using RoboHelp X5 for Word / Word 2003 for the source
    and most of the translations; RoboHelp Asian Edition, Simplified
    Chinese / Word 2003 for the Chinese translation. The heading level
    hierarchy error occurs in both versions.

    >> AF: I've commented in sections...
    Without Maintain Heading Levels, RH will apply heading levels
    to the books and then the topic levels will get bumped down. So a
    top level book will be Heading 1 and the Headings in the topic will
    get bumped down to 2, 3 and 4 etc. If then you have another book
    one level down so that it gets Heading 2 applied, the same topic
    but under the level two book would then get 3, 4 and 5 applied.
    That is not the original problem but hopefully we are agreed
    that is how things work on that.
    >> Yes - that is the expected behavior. When it didn't
    happen as expected, that's what led me to the discovery of the
    cause of the problem (topic reuse).
    Your problem was that firstly Heading 3 got bumped to Heading
    4 if the same topic was inserted into the TOC twice. I assume it
    was OK in the first instance, or is it that when you add it twice
    it goes wrong everywhere?
    >> Your assumption is correct. First occurrence is
    correct. Second, third, and fourth (yes - there is one topic that
    is used 4 times! ) are not correct based on TOC hierarchy.
    On the numbering, nothing surprises me. If you look at my
    site you will see that for RH HTML, i gave up on getting it right.
    I have had many queries on this and more than a few people have
    indicated they will work on the problem and get it working. I'm
    still waiting. There are many posts about outline numbering
    problems. Has anyone got it working satisfactorily?
    >> I don't really have numbering problems. The
    numbering is following the RoboHelp-generated hierarchy and the
    .dot template that I apply. It's just that the RH-generated
    hierarchy and its heading levels don't correspond to the "real"
    hierarchy because of the reuse issue.
    I have seen various Word gurus maintain that numbering has
    not worked entirely satisfactorily since Word 2! Also enough posts
    to convince me this is a Word issue, not a RH issue.
    If you want to create a new project and knock something up
    that demonstrates this problem, by all means zip it up and send it.
    I'll assume it will be a small project and zip to less than 5mb. If
    more, contact me first.
    >> Unless you have RoboHelp X3 Asian Edition,
    Simplified Chinese, there is really no need. I plan to either avoid
    the reuse issue in the source, or build the print doc in sections
    which is easy enough in RoboHelp X5 for the non-Chinese languages.
    It is in the older Asian edition where the problems are compounded
    by the omitted reuse topics. If you do have RoboHelp X3 Asian
    Edition, Simplified Chinese and want to experiment, I can send you
    a cut-down version of the project. Don't feel obligated though;
    unless you can read Chinese (I can't) it is very tedious to work
    with.

  • Running the VI more than once, won't populate the array correctly!

    I have found something pretty weird while I was trying to do the following:
    I have an Array to wich I want to append a new set of data from two sources. To do
    this I found two different ways:
    1. I can take the array and append every element (from the sources of new data) to
    the array.
    2. Or, I can create a new array, and append it to the previous one.
    Every of those solutions is ilustrated in the enclosed VIs. But the second one
    doesn't work correctly. If we run it just once, it will display the correct data,
    but if we run it more than once, it will show the cells of the appended data
    empty!!!
    How come this happens? It seems I'm missing something very basic and i
    mportant.
    Thank you for your time and help.
    Regards,
    JAVIER
    Attachments:
    1_This_is_the_working_solution.vi ‏20 KB
    2_Why_does_this_doesnt_work.vi ‏24 KB

    Hi,
    actually you don't need to add elements continiously to each other or to the array.
    The basic solution is to form the appropriate array and insert it into your array.
    I have made the example.
    Good luck.
    Olrg Chutko.
    Attachments:
    Solution3.vi ‏20 KB

  • Play audio more than once on a button

    I have a need to configure the audio placed on the success status of the button to play more than once.  My users may need to hear it again but when clicking it the second time the only thing you hear is the click sound, not the audio.  I am using Captivate CS5 and have it set to infinite. 
    Thanks for any assistance! 

    Hi there
    I seem to make it work as follows:
    Configure a Success caption for the button that is transparent and has no text. Then assign the desired audio clip to the caption.
    Now configure a simple Advanced Action that is a Standard action of Assign. Assign the variable rdcmndGotoFrame with rdinfoCurrentFrame. Assign this action to the Button. This keeps the slide from progressing when the button is clicked.
    In my test, the audio played over and over without fail. The only down-side is if you repeatedly click the button too soon. Sometimes you would get just a click. But if you paused briefly between clicks, things sort of "reset" and the audio consistently played.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Bought an album too many times...dont' want to be charged more than once!

    Can someone PLEASE help me?? I tried to 'gift an album' yesterday for my friend. For some reason, he couldn't redeem the code iTunes gave him, so I sent it once more...and then another time. Finally, the 3rd time worked, and he now has access to the album I bought for him. But I do not want to pay 3 times!! How do I fix this? The error kept telling him the code had been redeemed already, but actually, it wasn't...he only has the album once! What do I do?? Please help!

    Did you actually gift the album multiple times; i.e. you clicked the "gift this album" multiple times? What does your purchase history for your account say? If it shows that you did inadvertently gift the album multiple times and were charged more than once, contact the iTunes Music Store customer support department through the form at the bottom of this web page and explain the problem to them.

  • Since I updated to iCloud, Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 has no problems. What's wrong?

    Since I updated to iCloud, (which may or may not be related) Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 and my old iMac has no problems. When there is no service a yellow warning triangle appears adjacent to the Inbox and Connection Doctor reports,"Trying to log into this MobileMe IMAP account failed. Verify that username and password are correct."  Since it does fetch Mail from time to time they cannot be wrong.... can they? Should I update to 10.7 and if so what does that entail?

    You have been using MobileMe's email settings, which sometimes continue to work for a time after migration but then get turned off. iCloud's mail server settings are different. Strictly speaking Lion 10.7.2 is required for iCloud, and on that Mail is set up automatically.
    Snow Leopard cannot access most of iCloud's facilities, however you can set Mail up manually to access your email. The method is described here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudmail.html
    The situation with iCloud and Snow Leopard is described in detail here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudSL.html

Maybe you are looking for

  • Error While Transporting of Transformation

    Hello Experts, I am having an issue and hoping that someone can help me. Let me clarify very easyly, I have a transformation in test system which have also keyfigure routines in it( object Routine ) without any syntax error. For the current requireme

  • Foreign key in many to one relationship causes redunency

    Hi suppose I have two tables A and B Table A has a primary key A_PK number Table B has a primary key B_PK number The relation between two tables is M to One if B_PK is foreign key on table A then it causes redunency A_PK B_PK 1 1 2 1 so what the best

  • Pages can't open a file

    When I'm going to open a .pages file it says that pages is closed unexpectedly. How I can open this file or copy all I had there? I have to edit it and take an image is not a solution. Thanks!

  • Deploying Standard JSR 168 Portlets Without JDeveloper

    Is there a way to deploy standard JSR 168 portlets without using JDeveloper?

  • I lost my ringtones with the new ios 7 update

    I updated my Iphone 4s to the IOS 7 update and I lost my ringtones and my songs. could someone tell me how to get my songs and ringtones back please.