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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:29:35+00:00 2026-05-23T05:29:35+00:00

I have a simple controller that handles a submit with a couple of parameters,

  • 0

I have a simple controller that handles a submit with a couple of parameters, not so much that I would consider creating a command object to store them.

In my controller I have annotated the parameters with @RequestParam but I have to send these values to the view and I don’t know what’s the best way of doing it.

If I had a command object I could use the modelAttribute on the html:form tag to bind the parameters but I don’t want to create a command object for just a bunch of fields.

What is the preferred way of sending the values to the view (request attributes, model attributes … )?

  • 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-23T05:29:36+00:00Added an answer on May 23, 2026 at 5:29 am

    I’d say model attributes. Something like

    @RequestMapping("/path")
    public void test(@RequestParam("q") String q, ModelMap model) {
        model.put("q", q);
    }
    

    On front end you could print it using your favourite approach. A sample with JSTL

    <html> 
       ...
       <c:out value="${q}" />
     </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form in python + pylons that submits to a controller.
I have a simple UserControl for database paging, that uses a controller to perform
I have a simple Partial View that I would like to automatically call a
i wish to have a simple Action in my controller that accepts a few
I'm working on a simple note-taking/painting app. I have a view controller that works
I have a simple controller which returns images: public class ImageController : Controller {
I have a simple unsubscribe function in my Unsubscribed controller. if ($this->Unsubscribe->save($this->data['Unsubscribes'])) { //
The question is quite simple : I have a controller plugin for Zend Framework.
A simple question: I have a Model-View-Controller setup, with Models accessing a SQL database.
I have simple win service, that executes few tasks periodically. How should I pass

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.