Announcement Announcement Module
Collapse
No announcement yet.
Neither Errors instance nor plain target object for bean name 'userBean' available as Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Neither Errors instance nor plain target object for bean name 'userBean' available as

    Hi i am getting the following exception when I use the code

    javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither Errors instance nor plain target object for bean name 'userBean' available as request attribute
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:862)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:791)
    org.apache.jsp.jsp.userForm_jsp._jspService(userFo rm_jsp.java:279)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:374)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:390)

    the code in JSP is



    <%@ taglib prefix="core" uri="http://java.sun.com/jstl/core" %>

    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>


    <html>
    <head><title>techfaq360 Spring Hibernate Example</title></head>
    <body>

    <center>

    <h1>techfaq360 Spring Hibernate Example</h1>
    <br/>

    <form method="post" action="/springhibernate/test/userPage.do">
    <table width="70%" border="1">
    <tr>
    <td align="center" bgcolor="lightblue">Save User Details</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="userBean.userName">
    <input type="text"
    name="userName"
    value="<core:out value="${status.value}"/>"/>
    </spring:bind>
    </td>

    </tr>
    <tr>
    <td colspan="2" align="center">
    <spring:hasBindErrors name="userBean">
    <font color="red"><core:out value="${status.errorMessage}"/></font>
    </spring:hasBindErrors>
    </td>
    </tr>
    <tr>
    <td width="33%" align="right">DeptName: </td>
    <td width="66%" align="left">
    <spring:bind path="userBean.deptName">
    <input type="text" name="deptName" />
    </spring:bind>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <spring:hasBindErrors name="userBean">
    <font color="red"><core:out value="${status.errorMessage}"/></font>
    </spring:hasBindErrors>
    </td>
    </tr>
    <tr>
    <td align="center" colspan="2">
    <input type="submit" value="save">
    </td>
    </tr>
    </table>

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

    </form>

    </center>

    </body>
    </html>

    <spring:bind path is the place where i am getting exceoption.. Please help..
    Last edited by alcheringaa; Mar 10th, 2010, 04:01 AM. Reason: updated code
Working...
X