Is it possible to disable the default errorPages?

Is there a way to turn off the automatic errorPages? I know I can create an override and add my own pages but it would be nice to disable it.

For now, I assigned the 404 mapping to /bogus.cfm which is obviously not a real route in my application so I can do my own missing template handling in Lucee.

Let me know if this is possible. I’m using the built-in Undertow server

Not sure what you mean when you say “disable”. What exactly do you expect to show up in the browser? A blank page? I can’t say I’ve ever seen a web server that offered that.

I mean just send the request to the application server instead of serving the boilerplate page

This may be an easier conversation if we can discuss more specific situations. For example, a request to a missing .cfm file always goes to the servlet. But a request to a static file ike an image or JS file would never go to the servlet. It’s handled by the web server. Of course, you can configure your 404 handler to point to a .cfm file as you said, but that’s not a matter of “turning off” the error page, that’s just customizing what response you want. For example, IIS, Apache, or Nginx don’t have a way to “turn off” error pages. If you want them to send a request for a missing .jpg file to your app server, then you would configure it to do so.

Thanks, that makes sense.

1 Like