description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Cannot find any information on property 'strName' in a bean of type 'foo.Person' org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(JspRuntimeLibrary.java:837)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1011)
org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1062)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
property attribute should be name & empId then it will works....
In property attribute we shuld give name according to geter & setters not real variables in that bean.
Thanks,
Shailesh
Samaresh Gupte
Greenhorn
Joined: Oct 03, 2009
Posts: 20
posted
0
Thank you Shailesh.It worked
I have another query.
In the bean tag when we set the property to primitive value, does the automatic type conversion take place only when the type and class have the same bean class..say
Now will the same thing work if say:
Shailesh Narkhede
Ranch Hand
Joined: Jul 10, 2008
Posts: 356
posted
0
what is relation between Employee & Person(subclass - superclass) ?
first thing you need to understand the following rule for Bean
1) a bean can have a public method that can be used to set the value of a property. This method is called a
setter method. The method does not return any value, and its name starts with "set" followed by the name of the
property. A setter method has the following signature:
For example, the setter method for the property operand must be named setOperand. Note that the spelling for the
property name is not exactly the same. A property name starts with a lowercase letter, but the name of the setter uses
an uppercase letter after "set"; hence setOperand.
2) a bean can have a public method that can be called to obtain the value of a property. This method is called
a getter method, and its return type is the same as the property type. Its name must begin with "get"; followed by the
name of the property. A getter method has the following signature:
As an example, the getter method for the property named operand is getOperand. A property name starts with a
lowercase letter, but the name of the getter uses an uppercase letter after "get;" hence getOperand.
so your methods name should be
same for get method
also don't need type="foo.Person" in usebean Tag
try this
Samaresh Gupte
Greenhorn
Joined: Oct 03, 2009
Posts: 20
posted
0
Well thank you Swapnil
what is relation between Employee & Person(subclass - superclass) ?
Sorry forgot to mention the relation
Employee extends Person
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.