In GlassFish, when no error page is specified for a given web application, a default error page will be displayed. In some use cases, it is desirable to turn off the default error page. In this blog, we will summarize different ways to achieve this.
In a Virtual Server
One can turn off the default error page in a given virtual server by specifying a property with nameerrorReportValve and value "". For instance, in domain.xml, it is as follows: