Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts Preprocessor

 
Sai P Kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some information regarding the INTERCEPTION OF REQUEST in struts.
How do I configure Struts to intercept requests and perform some logic before passing them to the controller servlet for processing?
Is controller servlet different from action servlet?
[ January 22, 2004: Message edited by: pavannavap kumar ]
[ January 22, 2004: Message edited by: pavannavap kumar ]
 
Junilu Lacar
Marshal
Posts: 10356
123
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Struts ActionServlet is the controller servlet. The ActionServlet receives (not intercepts) the request because you tell the web container, via definitions in web.xml, to pass any requests that match '*.do' to the Struts ActionServlet. You extend the functionality of the ActionServlet via your Action classes, which are called upon by the ActionServlet to service specific requests as defined in struts-config.xml. So, if you want to do anything with the request, you would probably do it from an Action class. If you want to do something with the request before it gets to the ActionServlet, you could use a Filter.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!