• 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

struts-config.xml help

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

In an struts application,When struts-config.xml file load? and what is request processor?
what is the purpose of request processor?
last but not least where we write our business logic in struts?
is it action class or bean class(model)
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go through the Struts Survival Guide by Srikanth Shenoy. It explains everything in detail.
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

First of all, the title for the question is misleading as this question does have more aspects out of struts-config.xml file.


When struts-config.xml file load?



As and when any request comes for the resource which requires the Struts ActionServlet to continue processing, the struts-config.xml file is coming into picture. To say with an example, when you say, *.do for the url-pattern, invoke the ActionServlet name which is mapped to the servlet-class of org.apache.struts.action.ActionServlet class!

But i m not too sure of it as it may depend on the Web or Application Server's nature!


what is request processor? what is the purpose of request processor?



RequestProcessor is one who handles and delegates the call to the execute() method of the appropriate Action classes. Same as how the service() method delegates the call to either doGet() or doPost() of a Servlet.


last but not least where we write our business logic in struts?
is it action class or bean class(model)



Basically, the bean class being used as a Model is to just represent the data! Action class is the main point of invocation where you may start your flow of implementing the business logic.

You can have a bit of business logic implemented in the Action Class and/or call the other layers for continue with the actual business logic.

Hope this helps to an extent!
 
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic