I try to unravel (of course, without comment) the code of the contractor that was preceded (and I don’t have access to it now) at my current concert, and I came across three parts of the code that I found strange and hoped that someone could understand me, why this could be done, since I cannot come up with any good reason for this, I was hoping that someone else could understand me :).
The application is structured as a Java web application, and there are many JSPs and several servlets. Pretty standard stuff ... until I came across four classes that are the key to what this application should do. These classes do not extend the HTTPServlet , but contain the main() method. To make things more confusing, classes are not mentioned anywhere else in the project. As if they were simply dumped into the containing package to avoid creating a new project?
My question in condensed form is this: is there any good reason to have classes containing main() methods contained in a web application?
source share