First thing you can do is put in a custom 404 error page. See the archives
or check the docs. It's easy to do.

Second you can override the server header normally sent by tomcat by adding
this line BEFORE any servlet output has been done.

Hope that helps.
Donie


    public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
    {
        try
            {
                  // Override the Server header
                  res.setHeader("Server", "My Custom header that give no
tomcat version info");
                
                // Your servlet code goes here....
                        
        }
        catch (Exception ex) 
        { 
            res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        }
    }    

-----Original Message-----
From: Allan Bruce [mailto:[EMAIL PROTECTED]
Sent: 22 January 2004 12:00
To: [EMAIL PROTECTED]
Subject: Stop displaying version info


Is there a way I can get tomcat to stop displaying so much info if somebody
hits a 404 or other error? Its a good clue for hackers to start if they know
what version of a popular software I am running.  I have it so that apache
displays no info, now just to get tomcat to do the same.
Thanks
Allan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to