Search code examples
javamodel-view-controllerweb-applicationsstrutsprogram-entry-point

Where is PSVM in a struts MVC-2 web application?


Where is public static void main() in a web application using struts framework and MVC architecture?


Solution

  • There isn't one, nor is there a need for one.

    Web apps are not command-line apps. The "entry point" in web apps is determined by URL mapping patterns. The app server itself has an entry point, but how the web app artifacts are accessed is determined by the app server, for example, by following the servlet spec.

    In the servlet spec, the entry points into URL-based entry points are things like doGet and doPost. In Struts 2 the default action handler entry point is the execute method.