How to handle more than one submit buttons on servlets

Hi:
anyone know how to handle the multiplet submit button on servlet,
such as next, previous, add and so on.
Thank you

Don't worry about because only the button that is clicked will get submitted. In the servlet you just test for the existance of a parameter:
if (request.getParamter("SubmitButton1") != null) { ..... }
if (request.getParamter("SubmitButton2") != null) { ..... }
Save the following HTML code, open in IE and click on the buttons to see what will get sent to the servlet:
<html><head></head><body>
<form method="GET">
   <input type=text name=text1>
   <input type=submit name="Submit1" value="Me">
   <input type=submit name="Submit2" value="you">
</form>
</body></html>

Similar Messages

  • How can I add more than one submit button in a jsp without use of javascrip

    I want to add more than one submit button in a jsp without use of javascript

    you can do add multiple submit button with this way
    <input type="submit" value="Previous" />
    <input type="submit" value="Next" />
    <input type="submit" value="Finish" />

  • Can you have more than one submit button on a form?

    I'd like to divide a form so that there are two sections, each with their own submit buttons.  Is it possible to have more than one and if so, how do you "create" a button?

    Hi,
    You could try Redirect URL under Options tab. The way is you create two forms instead of two sections. Let's say form A and form B, then set form A's Redirect URL to form B.
    After submit form A, it will jump to form B after seconds, which you can also set in Redirect URL option.
    Let me know if this can help you.
    Thanks,
    Pengpeng

  • How to handle more than one message coming from an async BPEL in a sync BPEL process?

    Here is the scenario,
    Sync process A is calling an Async process B and Async process B  is developed in such a way that it is returning more than one message to sync process A, how you will handle those messages in sync process A?

    As durga said, its a wrong design, you will have issues in real time. You wont get the response back most of the time. It can be otherway around, async is waiting for sync process.
    Change your design or provide what is your use case below, we can think of which design suits you.
    Thanks,
    Vijay

  • How to handle more than one button in a form?

    Hello Java fans,
    I am new to Servlets. I am facing a problem in java servlet. I tried to place two buttons in the form. Both buttons has to invoke different servlets. How to associate action to each button?
    Thanks in advance,
    SMVEL

    Give each button a different name so that you can check which button is clicked.
    <input type="submit" name="button1" value="Press this button to invoke servlet1">
    <input type="submit" name="button2" value="Press this button to invoke servlet2">
    Then in your controller servlet:
    if(request.getParameter("button1") != null){
    //button1 is pressed.
    //forward to servlet1.
    else if(request.getParameter("button2") != null){
    //button2 is pressed.
    //forward to servlet2.
    }

  • How to share more than one Time Machine folder

    Hi,
    With Snow Leo Server I found how to find how to share more than one Time Machine Folder but I can't see how to do the same with Lion Server, could you help me with that ?
    The goal of that is to offer one TM folder per user which is located on a dedicated partition in order to limit the size of TM backups per user (150Gig).
    In Lion, in can only share one TM folder for everybody and I didn'tfind if I can set a limit size per user...
    Thank you in advance,

    I have figured out a way to enable multiple backup targets.
    However, it's one of these things I wouldn't want to describe to anyone except true programmer types, because everyone else has a 90%+ chance of messing up their system if they do something wrong.
    It involves turning off file sharing, and then editing the plist files in /private/var/db/dslocal/nodes/Default/sharepoints/
    The gist of it is this:
    a) first create all the share points you later want to use for TimeMachine, and set them up for afp-only file sharing, also create one TM target, which you can either use later, or have there so the system has one entry it knows how to handle. I just made a bogus one that I'm not actively using.
    b) turn off file sharing in Server.app
    c) turn off TimeMachine in Server.app
    d) now you can edit the files, the easiest is with Xcode, so you may want to install that first
    e) for each sharpoint you made in a) there will be a corresponding .plist file in the location indicated, these are the files that need to be edited.
    f) for each of these files
         1) the item0 string property in the timeMachineBackup array must be switched from 0 to 1
         2) a new key of type array with the name timeMachineBackupUUID must be created
         3) in the newly created array an item of type string must be placed with the value of a UUID, which can be created with the shell command uuidgen
    g) make sure all the edited plist files are saved
    h) turn on TimeMachine in the Server.app again
    If all went well, you now should be able to go to one of your networked client computers and see all the time machine share points just created as options for being a time machine target.
    Anyway, if you go that route: be careful, don't blame me if you muck things up...

  • How to add more than one clip to a drop zone?  New guy

    Hey all, I'm new to DVD studio and I'm trying to fiqure out how to add more than one clip to a Template drop zone. I'm using a 6 button template. I've named each button .. Football, Baseball, Hockey ...etc.
    How can put in MORE THAN ONE CLIP in the Football track/drop zone. So when someone clicks on Football they can see 3 examples.
    Do I need to create something to link to that Football button?
    Any replies appreciated

    You can edit the segments to be used in FCP or Motion so that the asset drop in has three examples
    Another way (if you want) is to make the entire menu outside of DVD SP so that the background layer is an m2v and the items are revealed/masked to some degree
    Take a look towards the bottom of this thread http://discussions.apple.com/thread.jspa?messageID=2951183&#2951183 where I discuss http://www.dvdstepbystep.com/Overmovies.zip
    Note that you can also use a basic overlay to do this. The overlay would be just solid black instead of the arrows/circles things I use in that example.
    For instance make the text one color and the box over the movie another (You can make it blue and the box red lets say) Draw a region over both for the button. Map blue for highlights/transparencies for normall/selected/activated and the same for the Box

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • How to select more than one slide on Keynote?

    Please, someone knows how to select more than one slide on keynote for IPad?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • How to make more than one partition on Airport Time Capsule?

    how to make more than one partition on Airport Time Capsule?

    Only for the very brave......
    Open up the Time Capsule (voids the warranty)
    Pull the hard drive
    Place the hard drive in a separate enclosure
    Connect the enclosure directly to your Mac
    Use Disk Utility to partition the hard drive
    Reinstall the hard drive back in the Time Capsule
    For the rest of us.....
    The next best thing might be to set up one or more disk images on the Time Capsule, which will allow you reserve a given amount of space for each disk image.
    Open up Macintosh HD > Applications > Utilities > Disk Utility
    Click on the New Image tab
    Navigate to the Time Capsule
    Set up the disk image by naming it and specifying how much space you want to reserve

  • How to attach more than one picture on an email

    How to attach more than one picture on an email?

    Tap the square with arrow on top right and select pictures you want to send (max 5 pictures)
    http://i1224.photobucket.com/albums/ee374/Diavonex/f0bd7d73.jpg

  • How to sync more than one iphone to a macbook?..

    How to sync more than one iphone to a macbook?..

    Open itunes, connect iphone, select what you want to sync, sync
    Do the same for each iphone.

  • How to add more than one tabular region in a page?...

    How to add more than one tabular region in a page?
    i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error
    1 error has occurred
    Updatable SQL Query already exists on page 2. You can only add one updatable SQL query per page. Select a different page.
    but i have to add the tabular in that page.
    Is it possible?
    pls help...
    Thanks and regards,
    skud

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

Maybe you are looking for

  • Exception currencies TCURX table, R3 - BW loading issue

    Hello Friends, I am facing issue in report values for amount in local currency key field. Its value not matching with R3 values. Decimal places are shifted in report. We are on BI7 (RSDS data source). There is data coming from R3 into one DSO from di

  • How to save swatches in illustrator

    Hello, when I try to save swatches to a folder in illustrator, I can not select .ase file only .ai file. and I am not able to open the saved swatches. I need to place them in a folder so that I can have color swatches for a client and use them for mu

  • IAS 10.1.2.0.2 on  SUSE 10 SP1 Can´t open Form applet

    I set my forms listener servlet listener servlet it OK white paper. If I open: http://myserver/servlet/lservlet It will shows that the Forms Listener Servlet is Up and Running...etc.. But If I open my form: http://MYIP:7779/forms/fservlet?config=&for

  • Full browser support -.-;;;;;;

    This has become a rather annoying problem, but first, let me start out with a little bit of fact. 1.NEARLY 3 YEARS HAS GONE BY SINCE 64 BIT VISTA HAS BEEN RELEASE TO THE PUBLIC. 2.A LARGE PERCENTAGE OF COMPUTERS BEING SOLD TO THE PUBLIC ARE 64 BIT MA

  • Galaxy Stellar Email Brightness Settings

    The pre-installed email product on my Samsung Galaxy Stellar is experiencing the following problem after OS System Updates: All other programs on the phone utilize the brightness settings from the Display settings, but the email product is dim (pre-s