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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:14:47+00:00 2026-06-12T17:14:47+00:00

I am using Spring MVC 3.1 to develop a Java web app. I have

  • 0

I am using Spring MVC 3.1 to develop a Java web app. I have a JSP that has two paired radio buttons, an entry field, and a dropdown select box. I need these values to be available to my mapped controller, via a model class’ fields.

The security and URL mapping works fine, as I’ve seen in debugger before. The issue is that when I tried to get the JSP data values populating my model, I get an error:

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

Here is part of my JSP:

<c:url var="cccUrl" value="/registers/default/ccPreauth/authorize" />
    <div class="mainWrapper">
    <form:form id="cccForm" action="${cccUrl}" method="post" modelAttribute="cccForm">
  ...
<table>
    <tbody>
        <tr>
            <th>Select an option.</th>
        </tr>
        <tr>
            <td>
                <div class="field-input">
                    <form:radiobutton id="paymentOption" path="paymentOption" value="authorizeCC" />
                    Collect Credit Card Information
                </div>
                <div class="field-input">
                    Authorization Amount $
                    <form:input path="authAmount" maxlength="10" size="10" class="extendWidth"/> 
                    <span class="instructions">
                        <spring:message code="label.authorization.note" />
                    </span>
                </div>
                <div class="field-input">
                    <form:radiobutton id="paymentOption" path="paymentOption" value="cancelAuth" />
                    Choose a Reason and Cancel Credit Card Collection
                </div>
                <div class="field-input right">
                    <form:select id="selectedReason" path="selectedReason" >
                        <c:forEach items="${reasonList}" var="reason">
                            <option value=${reason.reasonText}>${reason.reasonText}</option>
                            <br />
                        </c:forEach>
                    </form:select>
                </div></td>
        </tr>
    </tbody>
</table>
</div>
<div class="right">
<button class="btnBlue" id="submitButton" type="submit">

Here is part of my controller:

    @Controller
@RequestMapping(value = "/registers/default/ccPreauth")
@SessionAttributes(ControllerConstants.DEFAULT_REGISTER_ATTR_NM)
public class CCCaptureController {

...
    @RequestMapping(value="/authorize" )
public ModelAndView authorize(
         final Authentication auth,
         final @ModelAttribute("ccCapturePaymentRequest") CCCapturePaymentForm ccCapturePaymentRequest,
         final BindingResult result,
         final HttpServletResponse response) {

      final ModelAndView mav = new ModelAndView(CC_PREAUTH_PAYMENT_VIEW);

      return mav;
}

and finally, here is my model class:

    public class CCCapturePaymentForm implements Serializable {

    private static final long serialVersionUID = 6839171190322687142L;
    @NumberFormat(style = Style.CURRENCY)
    private BigDecimal  authAmount;
    private String      selectedReason;
    private String      paymentOption;

    public BigDecimal getAuthAmount() {
        return authAmount;
    }

    public void setAuthAmount(BigDecimal authAmount) {
        this.authAmount = authAmount;
    }

    public String getSelectedReason() {
        return selectedReason;
    }

    public void setSelectedReason(String selectedReason) {
        this.selectedReason = selectedReason;
    }

    public String getPaymentOption() {
        return paymentOption;
    }

    public void setPaymentOption(String paymentOption) {
        this.paymentOption = paymentOption;
    }

}

Can anyone tell me what I need to get this to work correctly? Please don’t stop at just the reason for the exception above – please verify and correct my code as I am on a tight schedule as usual and have little experience with Spring MVC. 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-12T17:14:48+00:00Added an answer on June 12, 2026 at 5:14 pm

    I found the answer for those Spring MVC newbies…

    I had to set the “cccForm” to a new instance of my next page’s form inside the controller search method (that then tries to being up the page that was getting the error).

    In a nutshell: I had to set the empty backing bean value in the preceding controller method so that the follow-on method and JSP page have it to work with.

    Hope this helps someone else avoid my mistake.
    Mark

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

Sidebar

Related Questions

I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
I'm using Spring MVC 3.0 and Tomcat. I have a bean that has a
I am using Spring MVC to develop a Java webapp. I have a setup
I am using Spring MVC with Hibernate. My page has a button that creates
I'm using spring MVC, and I have a custom authentication/security system that I had
I'm creating a web application using spring mvc. I have started to incorporate the
I am using Spring MVC and want to develop a website that uses REST
I am using Spring MVC 3.0 I have a guestbook.jsp page where I want
I am using Spring MVC to build my web application, and I have a
I am used to develop web applications in Java (Struts, Spring, JSP...). But now

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.