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

  • bind error urgent help needed

    org.apache.jasper.JasperException: org.springframework.web.servlet.support.BindStatus
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:372)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:142)
    org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:243)
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1141)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:878)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:792)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:475)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:430)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    root cause

    java.lang.ClassCastException: org.springframework.web.servlet.support.BindStatus
    org.apache.jsp.WEB_002dINF.jsp.logon_jsp._jspServi ce(logon_jsp.java:107)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:142)
    org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:243)
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1141)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:878)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:792)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:475)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:430)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

    My JSP
    --------------------------------------------------------------------------
    <html>
    <head><title>mkrishi Database Interfacing System Logon</title>
    </head>

    <body>
    <center>

    <h1>Database Interfacing System</h1>
    <br/>

    <form method="post" action="logon.html">
    <table width="25%" border="1">
    <tr>
    <td align="center" bgcolor="lightblue">Log on</td>
    </tr>
    <tr>
    <td>
    <table border="0" width="100%">
    <tr>
    <td width="33%" align="right">Username: </td>
    <td width="66%" align="left">

    <spring:bind path="user.username">
    <input type="text"
    name="username"
    value="<core:out value="${status.value}"/>"/>
    </spring:bind>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="center">

    </td>
    </tr>
    <tr>
    <td width="33%" align="right">Password: </td>
    <td width="66%" align="left">

    <spring:bind path="user.password">
    <input type="password" name="password"
    value="<core:out value="${status.value}"/>"/>
    </spring:bind>

    </td>
    </tr>
    <tr>
    <td>
    <spring:hasBindErrors name="user">
    <p>There were ${errors.errorCount} error(s) in total:</p>
    <ul>
    <c:forEach var="errMsgObj" items="${errors.allErrors}">
    <li>
    <spring:message code="${errMsgObj.code}" text="${errMsgObj.defaultMessage}"/>
    </li>
    </c:forEach>
    </ul>
    </spring:hasBindErrors>
    </td></tr>

    <tr>
    <td align="center" colspan="2">
    <input type="submit" alignment="center" value="Logon">
    </td>
    </tr>
    </table>

    </td>
    </tr>
    </table>

    </form>

    </center>

    </body>
    </html>
    -----------------------------------------------------------------------
    controller class
    public class usercontroller extends SimpleFormController{

    public userbo ibi;



    protected ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response, Object command,Errors errors) throws Exception {


    user user=(user) command;
    ibi.authenticate(user);
    return new ModelAndView(new RedirectView(getSuccessView()));

    }
    public void setibi(userbo i) {
    this.ibi = i;
    }

    }

  • #2
    Use form tags instead of spring:bind tags.
    Also, can you please post your config file.

    Comment

    Working...
    X