There is no reason to have a ``++main++`` method in a web application. It may have been useful for debugging during application development, but such a method should never make it into production. Having a ``++main++`` method in a web application opens a door to the application logic that an attacker may never be able to reach (but watch out if one does!), but it is a sloppy practice and indicates that other problems may be present.
This rule raises an issue when a ``++main++`` method is found in a servlet or an EJB.
\[~ann.campbell.2]From example, I have no idea why this could be a security threat. And I am not sure which main methods we are supposed to detect ? the ones defined in Servlet classes ? if yes, this should be specified.