Discussion:
Removing version string from banner
Rourke
2018-02-14 17:23:32 UTC
Permalink
When an error happens I get an error saying:
Apache Tomcat (TomEE)/8.0.0 (7.0.0)

I know how to get rid of "Tomcat" and "8.0.0"... How can I do the same with
"Tomee" and its version?



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Jean-Louis Monteiro
2018-02-14 17:45:45 UTC
Permalink
You need to plugin in the error valve from Tomcat

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
Post by Rourke
Apache Tomcat (TomEE)/8.0.0 (7.0.0)
I know how to get rid of "Tomcat" and "8.0.0"... How can I do the same with
"Tomee" and its version?
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Jean-Louis Monteiro
2018-02-14 17:51:01 UTC
Permalink
Oups message left too quickly.

The default error valve from Tomcat generates this HTML with information
you may not need to discard for security reasons.
You can create your own and add it into the server.xml

https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ErrorReportValve.html
https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Error_Report_Valve

Hope it helps



--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Feb 14, 2018 at 6:45 PM, Jean-Louis Monteiro <
Post by Jean-Louis Monteiro
You need to plugin in the error valve from Tomcat
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
Post by Rourke
Apache Tomcat (TomEE)/8.0.0 (7.0.0)
I know how to get rid of "Tomcat" and "8.0.0"... How can I do the same with
"Tomee" and its version?
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f97944
1.html
Rourke
2018-02-14 18:04:30 UTC
Permalink
Sorry, I did not understand ver well.

In Tomcat, you just modify a properties file. I am not trying to change the
way the message is displayed, I am just trying to change the strings "Tomee"
and "7.0.0" to something else.

Do you know in which file these strings are located?



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Mark Struberg
2018-02-14 18:04:06 UTC
Permalink
or just add an <error-page> tag in your web.xml.
Because usually one wants to brand the error page anyway.

LieGrue,
strub
Post by Jean-Louis Monteiro
Oups message left too quickly.
The default error valve from Tomcat generates this HTML with information
you may not need to discard for security reasons.
You can create your own and add it into the server.xml
https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ErrorReportValve.html
https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Error_Report_Valve
Hope it helps
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Wed, Feb 14, 2018 at 6:45 PM, Jean-Louis Monteiro <
Post by Jean-Louis Monteiro
You need to plugin in the error valve from Tomcat
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
Post by Rourke
Apache Tomcat (TomEE)/8.0.0 (7.0.0)
I know how to get rid of "Tomcat" and "8.0.0"... How can I do the same with
"Tomee" and its version?
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f97944
1.html
Rourke
2018-02-14 18:07:08 UTC
Permalink
I have an error-page in my app (lets say http://myhost/app). But if someone
uses

http://myhost/appNAMEDOESNOTEXIST

TomEE will disclose the version in its own error page



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Romain Manni-Bucau
2018-02-14 18:18:40 UTC
Permalink
Set the valve
https://github.com/apache/tomee/blob/master/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/valve/MinimumErrorReportValve.java
in your server.xml and you are done whatever your apps/web.xml do.
Post by Rourke
I have an error-page in my app (lets say http://myhost/app). But if someone
uses
http://myhost/appNAMEDOESNOTEXIST
TomEE will disclose the version in its own error page
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Rourke
2018-02-14 18:43:14 UTC
Permalink
It seems to work from the few tests I have done. Many thanks.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...