Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:15:52+00:00 2026-06-09T19:15:52+00:00

I have 3 buttons for a form I would like to submit. I’m new

  • 0

I have 3 buttons for a form I would like to submit. I’m new to struts and I was wondering, is there a way to find which button was clicked? In my html I have this

<html:form action="myAction.jspa">
    <div align="right">
        <html:submit value="back" />
        <html:submit value="continue Later" />
        <html:submit value="submit"  />
    </div>
</html:form>

And in my Java Action class in the execute() method, I attempt using request.getParameter("back") to check if the back button has been pressed but it doesn’t work. How does one handle multiple submit buttons in struts?

Thanks for help in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:15:54+00:00Added an answer on June 9, 2026 at 7:15 pm

    Use the property attribute on your <html:submit> tag to specify the name of the request parameter that you’ll check in your action.

    JSP

    <html:submit property="back">back</html:submit>
    

    Action

    if(request.getParameter("back") != null) {
        // back button was clicked
    }
    

    You can, alternatively, give all of your submit buttons the same property, then check the value of the parameter in your action. However, that adds additional internationalization concerns (you’d need to check for non-English translations of the same string).

    For more information, see the Struts API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with several submit buttons. I would like the button's click
I have two simple submit buttons on my form, which work just fine: <button
I have multiple buttons in a form (all are type 'submit'). I would like
I would like to have a window with a simple form (radio buttons and
I have a form with multiple submit buttons. When one of those button is
I have one form and two submit buttons. at the moment they are like
We have a form which has a few separate submit buttons which do different
I have 4 buttons on my form, a Submit, Cancel, Add and Remove button.
I have a form on which I would like the user to confirm one
I have two buttons for my form - a Save changes button and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.