0

With websphere if you request a file that isn't available you get an error messsage: "404 file not found" and that is it.

For example, if you request "/mydogxxxx.html" I get a response 404 file not found.

Pretty basic message.

If I request a jsp that isn't available, "mydogxxx.jsp" I get a 404 error code and stack trace information about my version of websphere and other details.

For security reasons, I need to disable that default jsp 404 error message. How can I do this?

Berlin Brown
  • 11,504
  • 37
  • 135
  • 203

3 Answers3

0

This is a very useful tutorial from the IBM web site.

Nikola
  • 14,888
  • 21
  • 101
  • 165
CodeCurmudgeon
  • 727
  • 1
  • 4
  • 3
0

See WebSphere customized error pages

dbreaux
  • 4,982
  • 1
  • 25
  • 64
0

Either add below in web.xml

<error-page>        
    <error-code>404</error-code>
    <location>/error/error404.jsp</location>    
</error-page>

Or if your traffic is flowing through HTTP server to the Application server, then modify directive in the webserver's httpd.conf as below and

ErrorDocument 404 /error/missing.html 
ad-inf
  • 1,520
  • 4
  • 30
  • 53