Controller in Struts

ajay picture ajay · Nov 3, 2009 · Viewed 24.3k times · Source

What is Controller in MVC ?

Is it struts.xml or Servlet (Action Class)?

Can we have more than one Controller in our application?

Is it good practice to have more than one controller?

Answer

cetnar picture cetnar · Nov 3, 2009

In Struts, application Controller layer code/functionality is split into two parts:

  • ActionServlet with RequestHandler
  • Action classes

ActionServlet acts like FrontController pattern.

alt text

Image from this OnJava article.