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

Recently I have been playing around with Eclipse and Tomcat for a class project. Today I decided to debug something and after I was done, I couldn’t run my code. I kept getting the “Two or more Web modules defined in the configuration have the same context root” error. It had me pulling out my hair for an hour. Finally figured out the solution. Here it is:

note:I have indigo version of Eclipse.
On the left hand side, expend the Servers folder and edit server.xml. 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"

Hit Ctrl+F and look for “docBase”, if you see two lines which look alike, delete one of them.

Advertisement
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s