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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:45:44+00:00 2026-06-04T17:45:44+00:00

I have create a Spring form like this: index.jsp <a href=/Spring_MVC/order.jsp>Order</a> Order.jsp <form:form action=createOrder

  • 0

I have create a Spring form like this:

index.jsp

<a href="/Spring_MVC/order.jsp">Order</a>

Order.jsp

<form:form action="createOrder" method="Post" modelAttribute="order">
        <table>
            <tr>
                <th>
                    Order ID:
                </th>
                <td>
                    <form:input path="order.orderId"/>
                </td>
            </tr>

            <tr>
                <th>
                    Product Name: 
                </th>
                <td>
                    <form:input path="order.productName"/>
                </td>
            </tr>

            <tr>
                <td>
                    <input type="submit" value="Submit"/>
                </td>
            </tr> 

        </table>
    </form:form>

Order.java:

public class Order {

    private String orderId;
    private String productName;

    /**
     * 
     */
    public Order() {


    }

    public Order(String orderId, String productName) {
        super();
        this.orderId = orderId;
        this.productName = productName;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }
}

OrderController.java:

@Controller
public class OrderController {

    private static final Logger logger = Logger.getLogger(LoginController.class.getName());

    /**
     * 
     */
    public OrderController() {
        super();
    }

    @RequestMapping(value = "/createOrder", method=RequestMethod.POST)
    public String createOrder(@ModelAttribute("order")Order order, BindingResult result) {
        logger.log(Level.INFO, "Order ID: " + order.getOrderId());
        logger.log(Level.INFO, "Product Name: " + order.getProductName());

        // Implementation validator

        // Data Binding the form properties to Order field
        if (result.hasErrors()) {
            logger.log(Level.INFO, "Error in Binding Result");
        }

        return "/order";
    }
}

I get the Neither BindingResult nor plain target object for bean name order available. Is it i need to create a bean name order using GET and pass to the web first before POST back to server.

Please help.
Thanks.

  • 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-04T17:45:47+00:00Added an answer on June 4, 2026 at 5:45 pm

    The problem is in your JSP page.

    You have used the field names wrongly in the path attribute of the input tag.

    it should be like this.

     <form:input path="orderId"/> 
    

    Hope this helps you.
    Cheers.

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

Sidebar

Related Questions

I have a jsp and I create a spring checkbox like this: <form:checkbox path=someList
I have this method call: public DataTemplate Create(Type type, string propertyName) { string str
I have a JSP that is using Spring:form tags to bind controls to a
Weird problem in Django with forms : I have a Form.class defined like this
I have a web form that uses if statements to create a string of
I have a string like following: CREATE GLOBAL TEMPORARY TABLE some_temp_table_name or CREATE GLOBAL
I have an HttpPost controller action that takes in a simple form DTO object.
I would like to create user in my user table when new user have
I have a user table that has many columns, it looks roughly like this:
I use Spring Security 3.0.3.RELEASE. I would like to create a custom authentication processing

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.