Announcement Announcement Module
Collapse
No announcement yet.
Binding error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding error

    Hi all,

    Can anybody plz help to me to bind jsp field values to java form.

    I am using:
    1)Registration.jsp
    2)RegisterForm.java
    3)RegistrationController.java
    4)RegistrationValidator.java

    Whenever I add spring:bind tag in my jsp it gives me error as:

    SEVERE: Neither Errors instance nor plain target object for bean name 'registerForm' available as request attribute
    javax.servlet.jsp.JspTagException: Neither Errors instance nor plain target object for bean name 'registerForm' available as request attribute
    at org.springframework.web.servlet.tags.BindTag.doSta rtTagInternal(BindTag.java:118)
    at org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:7 7)
    at org.apache.jsp.registration_jsp._jspService(regist ration_jsp.java:194)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:619)

    springone-servlet.xml entry is as:
    <bean id="registrationController" class="module.mashup.web.RegistrationController">
    <property name="bindOnNewForm"><value>true</value></property>
    <property name="sessionForm"><value>true</value></property>
    <property name="registerService"><ref bean="registerService"/></property>
    <property name="commandName"><value>registerForm</value></property>
    <property name="commandClass"><value>module.mashup.model.Reg isterForm</value></property>

    <property name="successView"><value>validation</value></property>
    <property name="validator"><ref bean="registrationValidator"/></property>
    </bean>

    Registration.jsp as:

    <spring:bind path="registerForm.EmailAddress">
    <input
    id="EmailAddress" class="RegistrationInput" name="EmailAddress"
    type="text" value="" />
    </spring:bind>

    and bean object is:

    String EmailAddress;

    String Password;

    String countryResidence;

    String citizenship;

    String captcha_response;

    public String getCaptcha_response() {
    return captcha_response;
    }

    public void setCaptcha_response(String captcha_response) {
    this.captcha_response = captcha_response;
    }

    public String getCitizenship() {
    return citizenship;
    }

    public void setCitizenship(String citizenship) {
    this.citizenship = citizenship;
    }

    public String getCountryResidence() {
    return countryResidence;
    }

    public void setCountryResidence(String countryResidence) {
    this.countryResidence = countryResidence;
    }

    public String getEmailAddress() {
    return EmailAddress;
    }

    public void setEmailAddress(String EmailAddress) {
    this.EmailAddress = EmailAddress;
    }

    public String getPassword() {
    return Password;
    }

    public void setPassword(String Password) {
    this.Password = Password;
    }

    I am unable to bind values from Registration.jsp to RegisterForm.java...Am i missing something...

    Thanks in advance...
Working...
X