Melvin,

Do you have any context.xml for this context in the 
CATALINA_BASE/conf/Catalina/localhost/ directory? It may be overriding your 
META-INF/context.xml

-Ryan
On Dec 19, 2018, at 10:45 PM, Melvin 
<melvind...@gmail.com<mailto:melvind...@gmail.com>> wrote:
Hello All,

Just came across a problem today. Hope someone will clarify it.

Tomcat 9.0.13.
I wanted to customize ErrorReportValve by setting showReport="false" 
showServerInfo="false".

Below is the META-INF/context.xml -
<Context>
<Valve className="org.apache.catalina.valves.ErrorReportValve" 
showReport="false" showServerInfo="false" />
</Context>

It works fine for any internal server error produced or exceptions thrown. But 
for the case when the browser sends unencoded characters the URL becomes 
invalid and Exception is thrown and stacktrace is shown in the browser.
When I give this valve in server.xml. It works fine. No issues. No stacktrace 
is shown on the browser when sending unencoded characters. When I give it in my 
context it fails only for this case.

Can anyone please help me on this.
Thanks in advance for your help.
Regards,
Melvin A

Reply via email to