Announcement Announcement Module
Collapse
No announcement yet.
Cant Map view with controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cant Map view with controller

    Hi,

    I am very new to Spring,I am using spring 3 and getting the following error anyone please help as soon as possible

    Error:

    ERROR [org.springframework.web.servlet.tags.form.InputTag] - <Neither BindingResult nor plain target object for bean name 'login' available as request attribute>
    java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'login' available as request attribute
    at org.springframework.web.servlet.support.BindStatus .<init>(BindStatus.java:141)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getBindStatus(AbstractData BoundFormElementTag.java:172)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getPropertyPath(AbstractDa taBoundFormElementTag.java:192)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getName(AbstractDataBoundF ormElementTag.java:158)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.autogenerateId(AbstractDat aBoundFormElementTag.java:145)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.resolveId(AbstractDataBoun dFormElementTag.java:136)
    at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.writeDefaultAttributes(Abs tractDataBoundFormElementTag.java:120)
    at org.springframework.web.servlet.tags.form.Abstract HtmlElementTag.writeDefaultAttributes(AbstractHtml ElementTag.java:379)
    at org.springframework.web.servlet.tags.form.InputTag .writeTagContent(InputTag.java:139)
    at org.springframework.web.servlet.tags.form.Abstract FormTag.doStartTagInternal(AbstractFormTag.java:90 )
    at org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:7 7)
    at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspx_met h_form_005finput_005f0(login_jsp.java:270)
    at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspx_met h_form_005fform_005f0(login_jsp.java:171)
    at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspServi ce(login_jsp.java:95)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:377)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:302)
    at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:236)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:257)
    at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1183)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:902)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:807)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:852)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:636)




    Controller as:

    @RequestMapping("/login.do")
    public ModelMap onSubmit() {

    return new ModelMap("vets");
    }

    and i'm forwarding to the following vets.jsp


    Jsp as: vets.jsp

    <form:form action="/login1.do" modelAttribute="login">
    <table>
    <tr>
    <th>MailId</th>
    <td><form:input path="mailid" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>SessionID</th>
    <td><form:input path="session" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>Start Time</th>
    <td><form:input path="starttime" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>End Time </th>
    <td><form:input path="endtime" size="30" maxlength="80"/></td>
    </tr>

    <tr>
    <th>CheckSum </th>
    <td><form:input path="checksum" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>Status </th>
    <td><form:input path="status" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>First Time </th>
    <td><form:input path="first" size="30" maxlength="80"/></td>
    </tr>
    <tr>
    <th>Date </th>
    <td><form:input path="date" size="30" maxlength="80"/></td>
    </tr>
    </table>
    <br/>

    <a href="<c:url value="/login1.do"/>">Add Owner</a>

    <p class="submit"><input type="submit" value="Find Owners"/></p>
    </form:form>


    And th a login bean as

    public class login {


    String mailid;
    public String getMailid() {
    return mailid;
    }
    public void setMailid(String mailid) {
    this.mailid = mailid;
    }
    String session;
    String starttime;
    String endtime;
    int checksum;
    String status;
    String first;
    String date;
    public String getSession() {
    return session;
    }
    public void setSession(String session) {
    this.session = session;
    }
    public String getStarttime() {
    return starttime;
    }
    public void setStarttime(String starttime) {
    this.starttime = starttime;
    }
    public String getEndtime() {
    return endtime;
    }
    public void setEndtime(String endtime) {
    this.endtime = endtime;
    }
    public int getChecksum() {
    return checksum;
    }
    public void setChecksum(int checksum) {
    this.checksum = checksum;
    }
    public String getStatus() {
    return status;
    }
    public void setStatus(String status) {
    this.status = status;
    }
    public String getFirst() {
    return first;
    }
    public void setFirst(String first) {
    this.first = first;
    }
    public String getDate() {
    return date;
    }
    public void setDate(String date) {
    this.date = date;
    }
    Last edited by santhoshpriyan; Mar 29th, 2010, 05:21 AM.

  • #2
    I can't see any indication of Spring Web Flow use. Maybe you should post this on the web forum instead?

    Comment

    Working...
    X