• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

few basic question..

 
trupti nigam
Ranch Hand
Posts: 623
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In struts framework, once the browser sends requests to JSP page, is it the controller servlet (action servlet) who populates the request parameters in form bean or the programmer has to take care of it.(I mean calling each getter and setter methods) ?
programmer is responsible for writting the validation logic and the execute method. am I right? Who sets the form bean fields??

thanks,
Trupti
 
Leandro Melo
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it the controller servlet (action servlet) who populates the request parameters in form bean or the programmer has to take care of it.(I mean calling each getter and setter methods) ?

No, the programmer doesn't need to call getter or setter, the ActionForm is responsible for populating the bean.

programmer is responsible for writting the validation logic and the execute method

Naturally, validation is logic is part of business logic, so you'll need to write this logic. But keep in mind the Struts offers you a very nice automated way to do it, and you can even use the Validator framework.

The execute method (in the Actions) should be written by the programmer, they are business logic, right! However, there are other choices with LookupDispatchAction, ForwardAction, etc, that makes very neat things.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic