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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:04:42+00:00 2026-05-18T01:04:42+00:00

I just want to send the value of my dropdownlist with a requestparameter. In

  • 0

I just want to send the value of my dropdownlist with a requestparameter. In my case being

Kidscalcula_web/start.htm?klasid=myValueHere

I know a way of doing this but it sounds so irrational to use it for this. If I was bored I’d probably write some jQuery to do a post and send the parameter for instance.Now it really sounds like a very bad idea to manually make my requeststring, since Spring takes care of that. So how could I make a simple form that just sends my dropdownvalue to my controller?

It’s just that I can’t find something so trivial anywhere, and one of you can probably help me out quickly.I suppose the controller would be just as trivial as:

    @RequestMapping(value = "post")
    public String postIndex(@RequestParam("klasid") String klasid, HttpServletResponse response,
            HttpServletRequest request) {
}

But I really can’t find any examples on how to make a JSP to send me that value. Is this possible with the <form>taglib ?

  • 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-18T01:04:42+00:00Added an answer on May 18, 2026 at 1:04 am

    The <form> taglib is generally used with form-backing command objects, rather than being bound to the controllers using individual @RequestParam arguments. This is why you won’t see any documentation examples of that combination being used together.

    For example, rather than having @RequestParam("klasid"), you’d have a command class with a field called klasid, and Spring would bind the whole lot together:

    @RequestMapping(value = "post")
    public String postIndex(@ModelAttribute MyCommandClass command) { /../ }
    

    This makes sense when you consider that forms typically have multiple parameters, and it’d get cumbersome to declare them all using @RequestParam.

    Having said that, you can still do it – any form controls will generate request parameters that @RequestParam can bind to, but if you choose to deviate from Spring MVC’s form-backing command pattern, then it’s quite awkward.

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

Sidebar

Related Questions

I just want to transfer (send or receive) a hash from client to server.
Just want to know if publishing an application on Google play is allowed using
Just want to know how to read an attribute of a parent node from
I just want to know why both the paint and draw methods are used
I have a code to send data to serial port. I just want to
I want to send both the value and key of the option box when
I've just implemented an FB.ui 'send' call. I process the returned value in the
I have just started playing around with Log4Net... I now want to send an
I want to send a parameter value over http using <a> tag but I
Just want to ask if i can use Custom Validator in client side without

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.