Stop displaying version info 2004-01-22 - By Donie Kelly
Back 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:allanmb@(protected)] Sent: 22 January 2004 12:00 To: tomcat-user@(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: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|