This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have Person.java with 2 attributes String name; private Dog dName; (along with getter, setter) Also Dog.java with attribute String dogName; (along with getter, setter)
In Servlet, ELTest1Servlet I am assigning the values to bean and forwarding to JSP;
In Jsp, ELTest.jsp: I am trying to display the bean values...
I am getting the error,
[2/5/09 22:50:29:920 EST] 00000028 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet /ELTest.jsp. Exception thrown : javax.servlet.ServletException: Unable to find a value for "dName" in object of class "foo.Person" using operator "."[/b][/b]
Anything wrong in my code? Pleae anyone of you help me to fix this.
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.
You can go back and change your post to add code tags by clicking the button on your post.
You should avoid property names which have a capital letter as the second character. I ran into the same problem when I tried to use "eMailAddress" as a property name. Something about the way the JavaBean rules change that into a method name (which I forget the exact problem now).
Joined: Aug 16, 2007
Not sure but, try putting nullary(no arg) constructor in both beans.This is one of few JavaBean conventions I guess you use HFSJ. you can also cross check with the code they have provided.