Meaningless Drivel is fun!
The moose likes Struts and the fly likes Customized Action Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Customized Action Servlet" Watch "Customized Action Servlet" New topic

Customized Action Servlet

Deepika Saxena
Ranch Hand

Joined: Jul 05, 2009
Posts: 59
This group is doing really great help to java aspirants. I am very thankful to all of the members. I am new to struts and have a doubt regarding Controller. Please suggest.

Since Struts is designed on MVC architecture, we are not allowed to use more than one Controller per our web application. is this only a guideline or can we have more than one Controller in our application. though this violates MVC design paradigm, is it allowed to use more than one Action Servlet with struts? if yes how can we achieve this?

Also, can we have our own base Action Servlet as a controller?

Thanks in advance.

Gagan Tiwari
Ranch Hand

Joined: Jun 10, 2008
Posts: 73
I don't think you can have more than one Controller or (Filter in Struts2),

Regarding creation of your own Controller:
You can create the Controller, however then you would be deprived of the services which the Struts Default Controller provides, as all those would need to be taken care by your own Controller.

However entire objective of using the Struts is to have a some MADE UP, tested and certified, BASE for web application development, and if we are writing our own controller and doing things ourselves it would mean doing things from scratch, so not sure actually where we would require to write our Controller in Struts.

May be some experience users can throw some light on it.
I agree. Here's the link:
subject: Customized Action Servlet
jQuery in Action, 3rd edition