查询Tomcat文档,解释如下:
org.apache.catalina. STRICT_SERVLET_COMPLIANCE
If this is true the following actions will occur:
any wrapped request or response object passed to an application dispatcher will be checked to ensure that it has wrapped the original request or response. (SRV.8.2 / SRV.14.2.5.1)
a call to Response.getWriter() if no character encoding has been specified will result in subsequent calls to Response.getCharacterEncoding() returningISO-8859-1 and the Content-Type response header will include a charset=ISO-8859-1 component. (SRV.15.2.22.1)
every request that is associated with a session will cause the session's last accessed time to be updated regardless of whether or not the request explicitly accesses the session. (SRV.7.6)
cookies will be parsed strictly, by default v0 cookies will not work with any invalid characters.
If set to false, any v0 cookie with invalid character will be switched to a v1 cookie and the value will be quoted.
the path in ServletContext.getResource / getResourceAsStream calls must start with a "/".
If set to false, code like getResource("myfolder/myresource.txt") will work.
If this is true the default value will be changed for: