Skip to main content

contextPath problem with root app in tomcat and JMX activated

  3 posts   Feedicon  
Replies: 2 - Last Post: February 17, 2012 08:36
by: dmendia
showing 1 - 3 of 3
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 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.

Posted: January 19, 2012 19:30 by icefox
Hi dmendia,

I would like to know what is the issue.

Are you able to use the JMX Console with Jawr?
Is your issue only related with the warnings in the logs?

If the issue is about the logs, I think that a modification of your log4j properties file should fix this issue,
until it get fixed in a next release.

Otherwise can you elaborate and give me more details on the issue you are facing?

Posted: February 17, 2012 08:36 by dmendia
Yes, my issue is related with the warnings in the logs.

I changed the log4j properties to workaround this warning, but when you fix it, please let me know to change it,

Replies: 2 - Last Post: February 17, 2012 08:36
by: dmendia
Please Confirm