wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes SprngFramework Form Binding Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "SprngFramework Form Binding Error" Watch "SprngFramework Form Binding Error" New topic
Author

SprngFramework Form Binding Error

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

I am getting the below error when i try to bind the form values with the command class

The error is as under

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'credentials' available as request attribute
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'credentials' available as request attribute
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:283)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'credentials' available as request attribute
org.springframework.web.servlet.tags.BindTag.doStartTagInternal(BindTag.java:119)
org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:103)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.

Regards,

Ujjwal Soni


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi All,

I've solved this issue. The problem was in the way i was accessing the application, Actually i was accessing the jsp page directly which had already a binding to the bean from the session object, now according the flow of spring, you need to access the controller first according to the URL mapping in spring-config file.

I accessed successfully this application by

http://localhost:8080/Validations/login.do

instead of my previous URL by which i was getting this error

http://localhost:8080/Validations/loginForm.jsp

Cheers!!!

Ujjwal B Soni

<baroda, gujarat, india>
<919998971048>
 
GeeCON Prague 2014
 
subject: SprngFramework Form Binding Error