Posted: January 18, 2012 12:45 by dmendia
We're facing next problem:
“WARN JmxUtils:258 - No context path defined for this web application. You will face issues, if you are deploying mutiple web app, without defining the context.
If you are using a server with Servlet API less than 2.5, please use the context parameter 'contextPath' in your web.xml to define your context path of the application.”
Our tomcat has several apps, with one acting as root app "/" (the one I told you about). And it has activated JMX. Tomcat is using servlet api 2.5. We're using jawr 3.3.3.
The solution shown in http://java.net/projects/jawr/forums/discussion-forum/topics/208-Setting-contextPath-dynamically-in-web-xml is not applicable in our environment, because we've a root app wich contextPath is defined like:
So, the exact problem is that we cannot change contextPath to another text different from "/" (because it's a root app), and for some reason JmxUtils is throwing this annoying warning in every request, because JmxUtils (line 212) thinks that contextPath is empty, but it's not!
I mean, if the app is a root one, getContextPath is "" and not "/" (servlet.jar code)
If you need more details, let me know!
Thanks in advance.