aspose file tools*
The moose likes Struts and the fly likes how does a jsp know what method in the actionform to send data to? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how does a jsp know what method in the actionform to send data to?" Watch "how does a jsp know what method in the actionform to send data to?" New topic
Author

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

protik ahmed
Greenhorn

Joined: Mar 21, 2010
Posts: 15
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

Joined: Jan 10, 2002
Posts: 61769
    
  67

Follows JavaBean rules.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how does a jsp know what method in the actionform to send data to?