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 6234997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:35:40+00:00 2026-05-24T10:35:40+00:00

In my Spring application when i click on the submit button on my form

  • 0

In my Spring application when i click on the submit button on my form reloads the page, i’m sure i had forgotten something but i can’t see the error

In the jsp, I’m creating the form like this:

        <form:form commandName="municipioBean" method="POST">
            <label for="df_mun">Estado</label>
            <form:select path="df_edo" name="df_edo" id="df_edo"
                onchange="getMunicipios();">
                <form:option value="0">Seleccione un estado...</form:option>
                <form:options items="${listaEstado}" itemValue="codProvincia"
                    itemLabel="desProvincia" />
            </form:select>

            <label for="df_mun">Municipio</label>
            <form:select path="df_mun" name="df_mun" id="df_mun">
                <option selected value="0">Seleccione un estado primero...</option>
            </form:select>

            <form:hidden id="id_ciudadano" path="id_ciudadano" />
            <input type="submit" name="procesar" value="Aceptar" />
        </form:form>

And my controller:

@RequestMapping(method = RequestMethod.POST, params = "procesar")
public String procesaSubmit(
        @ModelAttribute("municipioBean") MunicipioBean municipioBean,
        BindingResult result, HttpServletRequest request, ModelMap model) {


    return ConstantesAbre.PASOS_JSP;
}

Params value is equal to the name of my submit button and the RequestMethod it’s ok too, what’s the problem?.

Thanks in advice and sorry for my bad english D:

  • 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-05-24T10:35:41+00:00Added an answer on May 24, 2026 at 10:35 am

    You need to add a value in your @RequestMapping usually the name of the page.

    For example

    @RequestMapping(method = RequestMethod.POST, params = "procesar", value="/theJspName")
    

    I usually set up my controllers with the base path decalred at the top of the class like this:

     @Controller
    @RequestMapping("/main")
    public class MainController {
    
    
    @RequestMapping(method = RequestMethod.POST, params = "procesar", value="/theJspName")
    public String procesaSubmit(@ModelAttribute("municipioBean") MunicipioBean municipioBean,        BindingResult result, HttpServletRequest request, ModelMap model) {    
      return ConstantesAbre.PASOS_JSP;
    }
    

    So your full path would be something like http://server:port/application/main/theJspName

    There could also be an extension depending on how you set up your ViewResolver.

    Also make sure that you have

    <context:annotation-config/>
    <context:component-scan base-package="your package here"/>
    
    <mvc:annotation-driven/>
    

    defined somewhere in your app-servlet.xml or applicationContext.xml file.

    Hope that helps a little.

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

Sidebar

Related Questions

In my spring application context file, I have something like: <util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String"
I have an ASP.NET2.0 web page with a Submit button. When the user clicks,
In my application I have a Submit button that does this: private void Submit_button_Click(object
hi i am trying to make an application which can submit a comment to
I have a small application that has several checkboxes, a submit button, and a
We have a Hibernate/Spring application that have the following Spring beans: <bean id=transactionManager class=org.springframework.orm.hibernate3.HibernateTransactionManager
So I have a spring application divided into several modules, each in a separate
In our Spring application we use clustered Hibernate Search with ActiveMQ which sets up
I have a spring application that uses an embedded Jetty instance. Since I am
I'm developing a spring application that uses large MySQL tables. When loading large tables,

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.