• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean property problems

 
Charessa Reilly
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this code at the top of a class InquireRecord that compiles without a problem:

it uses the default constructor.

Here's code from opssreceived.jsp that uses that class as a bean:


If I submit a form that uses opssreceived.jsp to process I get this:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: Cannot find any information on property 'mgremail' in a bean of type 'com.serco.inquire.InquireRecord'
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:442)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


root cause

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Cannot find any information on property 'mgremail' in a bean of type 'com.serco.inquire.InquireRecord'
org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(JspRuntimeLibrary.java:613)
org.apache.jsp.opssreceived_jsp._jspService(opssreceived_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


root cause

org.apache.jasper.JasperException: Cannot find any information on property 'mgremail' in a bean of type 'com.serco.inquire.InquireRecord'
org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:753)
org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(JspRuntimeLibrary.java:603)
org.apache.jsp.opssreceived_jsp._jspService(opssreceived_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


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


any ideas?
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you created getter/setter methods for your properties, and have they followed the right conventions? Specifically, given your error message, what does your mgremail setter method look like?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your bean isn't a bean (in other words, doesn't follow the bean rules), it, of course, is not going to work as a bean.
 
Charessa Reilly
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took a look at the setter, and it did have an errant capitalization. The page loads now. Thanks for the help!

(now, if I can just find why the values I expect aren't displaying...)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic