This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Preprocessor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Preprocessor" Watch "Struts Preprocessor" New topic
Author

Struts Preprocessor

Sai P Kumar
Greenhorn

Joined: Jan 22, 2004
Posts: 11
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
Bartender

Joined: Feb 26, 2001
Posts: 4419
    
    5

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.


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Preprocessor
 
Similar Threads
Anybody using developing their project and adding UNIT Tests?
Where to get sample test case of MVC .
fwd or backward ,don't know which reference??
Should EJB not return initialized objects?
Simple controller needed ASAP