aspose file tools*
The moose likes JSP and the fly likes Bean property problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Bean property problems" Watch "Bean property problems" New topic
Author

Bean property problems

Charessa Reilly
Ranch Hand

Joined: May 26, 2011
Posts: 39
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

Joined: Apr 06, 2010
Posts: 4463
    
    8

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

Joined: Jan 10, 2002
Posts: 61626
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Charessa Reilly
Ranch Hand

Joined: May 26, 2011
Posts: 39
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...)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Bean property problems