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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:38:23+00:00 2026-06-13T16:38:23+00:00

I am teaching myself Spring Form tags, and have run into what is probably

  • 0

I am teaching myself Spring Form tags, and have run into what is probably a simple error that I haven’t been able to solve. I get the following error when I launch this app in a browser:

java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'index' available as request attribute

I’ve tried most of the fixes that came up in a Google search to no avail. Can someone spot where I went wrong? Below are the relevant components. Thanks very much.

Controller:

@Controller
@RequestMapping("/registration")
public class LoginController {

    @RequestMapping(method = RequestMethod.GET)
    public String setupForm(ModelMap model) {
        Registration registration = new Registration();
        model.addAttribute("registration", registration);
        return "index";

    }


    @RequestMapping(method = RequestMethod.POST)
    public String onSubmit(@ModelAttribute("registration") Registration registration, Map model) {
        return "success";
    }
}

JSP (/index.jsp):

        <form:form commandName="index">
        <table border="0" cellspacing="12">
            <tr>
                <td>
                    <form:input path="email"/>
                </td>
            </tr>

            <tr>
                <td>
                    <form:password path="password"/>
                </td>
            </tr>

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

Command Object (Registration.java) :

public class Registration {
    private String password;
    private String email;
    // getters,setters
  • 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-13T16:38:24+00:00Added an answer on June 13, 2026 at 4:38 pm

    In your index page correct the following and try

    <form:form commandName="index"> to <form:form commandName="registration">

    You can also do it like this if the above does not work

    <form:form modelAttribute="registration" commandName="registration">

    Thanks

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

Sidebar

Related Questions

I've been teaching myself C++ and someone told me that C++ does not have
I just started teaching myself C++ on the Mac, and I have run into
I'm teaching myself CIL and have been doing ok so far (just really started
I've been teaching myself Spring 3.0 by implementing a JavaEE Web-app using: Tomcat 7
I know this is a stupid question, but I have been teaching myself c#,
I am teaching myself Java and I have a simple package with three classes
I have been teaching myself programming for couple of years, and I was sure
I have recently started teaching myself C# and Asp.net. I am trying to build
I'm teaching myself programming and today's challenge is to write a program that can
I am teaching myself to use JavaCC in a hobby project, and have 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.