Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how does a jsp know what method in the actionform to send data to?

 
protik ahmed
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, I created a text box with property called creditnumber. I also created a get method in my actionform called getcreditnumber().

The set method was called setcrednumber(String creditnumber). forgetting that I had set the property to creditnumber in the jsp page, I renamed the get method to getcrednumber() to make it more similar to the set method. After compiling and refreshing the page, I get an error on the page that there is no getter method for that property. After renaming it back to getcreditnumber, it worked again. So can someone explain how a jsp page knows which method to send the data to. Why did it only pop an error for not naming the get method correctly, when the set method is not named in that format.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65114
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follows JavaBean rules.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic