This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes compilation error coming up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "compilation error coming up" Watch "compilation error coming up" New topic

compilation error coming up

shiju nair
Ranch Hand

Joined: Jul 18, 2008
Posts: 45
I am using jsp, .java file & bean
the code is given below:
this is my html page.

This is my a2.jsp.

This is my third

I have placed the jsp and html files in the folder C:\j2sdkee1.2.1\public_html & the class file of in C:\j2sdkee1.2.1\lib\classes
so when i try to run my code i am facing the error given below.Is it because that i have not coded properly or something else.
please help with this. your views would be valuable to me.
thanks in advance.

Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
You are calling method getPin() while your bean defines a getpin() method (note the difference in "P" and "p").
Change method declarations or adjust the JSP code, you should be fine then.
shiju nair
Ranch Hand

Joined: Jul 18, 2008
Posts: 45
Thanks for the help but still i am not able to find the difference in the method getpin().It looks as if everything is proper, if at all there is a difference then could you help me out with that particular line of code so that i can make the changes.
Thanks in advance.I am waiting for your reply
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510

You are not following the Java Bean spec. A property called 'pin' or 'acc' needs to have getters/setters in the form 'getPin', 'setPin'. You take the property name ('pin'), capitalize the first letter ('Pin') and place the get/set infront of it ('getPin'). The tags jsp:setProperty and jsp:getProperty are attempting to use the Bean Spec to access your getters/setters which are named incorrectly. If you look closely, that is whata the error message is telling you.

You need to correct the getters/setters for both acc and pin.
[ July 24, 2008: Message edited by: Michael Ku ]
shiju nair
Ranch Hand

Joined: Jul 18, 2008
Posts: 45
Thanks a lot .I have made the changes and it seem to be working fine.
I was so confused with this and because of this i was not able to go ahead with my project, but you solved it within a moment.your knowledge is really to be appreciated.
thanks once again.
take care
jQuery in Action, 2nd edition
subject: compilation error coming up
Similar Threads
newbie - problems with bean
having problem related to form submission using servlets
Where do i place the .class files?
validation using comparison operator in jsp
problem in TLD