Tomcat 400报错显示tomcat信息,这就存在着很大的安全隐患。

根据官网给出的方案需要重写ErrorReportValve处理400错误跳转到自定义页面,首先需要更改tomcat中的server.xml文件,在host中添加Valve,页面将不显示错误的详细信息。

<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.ErrorReportValve"
showReport="false" showServerInfo="false" />
</Host>
添加完重启tomcat生效,便没有了错误资讯和tomcat版本资讯。

Tomcat 400报错显示tomcat信息,这就存在着很大的安全隐患。根据官网给出的方案需要重写ErrorReportValve处理400错误跳转到自定义页面,首先需要更改tomcat中的server.xml文件,在host中添加Valve,页面将不显示错误的详细信息。&lt;Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"&gt; &lt;Valve className...
The Apache Tomcat ® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. The Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket specifications are developed under the Java Community Process. The Apache Tomcat software is developed in an open and participatory environment and released under the Apache License version 2. The Apache Tomcat project is intended to be a collaboration of the best-of-breed developers from around the world. We invite you to participate in this open development project. To learn more about getting involved, click here. Apache Tomcat software powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. Some of these users and their stories are listed on the PoweredBy wiki page. Apache Tomcat , Tomcat , Apache, the Apache feather, and the Apache Tomcat project logo are trademarks of the Apache Software Foundation.
tomca 400 错误 在请求目标中无法找到有效字符,有效字符在RFC 7203和 RFC 3986中定义 Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:503)
eclipse tomcat 启动 报错 404通常是因为 Tomcat 无法找到您要访问的页面或资源。这可能是由于以下原因之一引起的: 1. 您的Web应用程序没有正确部署或配置。请确保您的Web应用程序已正确部署并配置在 Tomcat 中。 2. 您正在尝试访问不存在的页面或资源。请检查您要访问的页面或资源是否存在。 3. 您的URL路径不正确。请确保您的URL路径正确,并且与您的Web应用程序的部署路径匹配。 如果您仍然无法 解决 问题,请查看 Tomcat 的日志文件以获取更多 信息