• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

compilation error coming up

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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 abean.java


I have placed the jsp and html files in the folder C:\j2sdkee1.2.1\public_html & the class file of abean.java 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.

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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
reply
    Bookmark Topic Watch Topic
  • New Topic