aspose file tools*
The moose likes Servlets and the fly likes more than one controller possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "more than one controller possible " Watch "more than one controller possible " New topic
Author

more than one controller possible

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
can we use more than one controller in web application
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Sure.
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
Is more than one controller possible in mvc2 design pattern
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

Yes.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sriram Sharma
Ranch Hand

Joined: Apr 12, 2006
Posts: 97
Hi,

Can you please explain how is it possible to have 2 controllers in single web application?
Would like to have a basic architecture information on this. I am unable to get how!

Regards,
Sriram
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
I dont know. my interview asked can you use more than one controller in one web application.
Sriram Sharma
Ranch Hand

Joined: Apr 12, 2006
Posts: 97
Yes Prakash...
I can understand that.
But, if you are going to take up more interviews, the question will not stop with this.
As soon as you say "Yes", the next immediate questio will be "How? Explain"
So, we need to know the complete depth of the subject. Its not just about "Yes" or "No".
If you get to know the answer, please pass on the solution to me as well.

Regards,
Sriram
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

Well, You can have any number of controllers in a web app. The fact that only one controller is come from Front Controller design pattern (Struts, Spring MVC etc.. utilizes) which, upon getting a request deals with the necessary components (i.e: request params, model, view etc.. which are configured by meta data) and generate the output ultimately. That makes code very easy to manage. Instead of this you can have separate controllers for each use case etc.. but that will be hard to manage.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: more than one controller possible