Two or more Web modules defined in the configuration have the same context root

Jeevan Dongre picture Jeevan Dongre · Mar 9, 2011 · Viewed 23.4k times · Source

I am running tomcat server 6.0, when I tried to run any web app on this server it gives me a error saying "Two or more Web modules defined in the configuration have the same context root To start this server you will need to remove the duplicate(s)."

I am using Eclipse 3.6 helios.

How do I remove the duplicates?

Answer

misterblinky picture misterblinky · Jun 21, 2011

In your tomcat conf directory, edit server.xml. My guess is that in there you have two entries for teh same context. Look for two occurrences of the same line. The line will look like the following, where "someApplication" would be your context root.

<Context docBase="someApplication" path="/someApplication" reloadable="true" source="org.eclipse.jst.jee.server:someApplication"/>