Reputation: 61
I am using Eclipse Luna and getting
Could not publish server configuration for Tomcat v7.0 Server at localhost.
Multiple Contexts have a path of /TestProject.
However I can fix this by making path for docbase = /
in context string in server.xml
as in context docBase="abc" path="/" reloadable="true"
source="org.eclipse.jst.jee.server:abc"/> docBase="xyz" path="/TestProject" reloadable="true" source="org.eclipse.jst.jee.server:xyz"/>
So I wanted to know what role does attribute 'path' play in context and how do I fix it permanently. I have seen the path get carried over when I copy a application to another application.
Upvotes: 4
Views: 14274
Reputation: 3182
Go to [workspace folder]->Servers->[Tomcat folder] then open server.xml
file and search for the <Context>
tag. There will be multiple <Context>
tags, remove the duplicates, something like this:
<Context docBase="service-name" path="/path of your service" reloadable="true"
source="org.eclipse.jst.jee.server:your-service-name" />
<Context ................... />
so remove this second <Context>
tag.
Upvotes: 0
Reputation: 428
In your eclipse tomcat, open server.xml and search "/abc", you will get this line, please keep only one and remove duplicate lines
<Context docBase="abc" path="/abc" reloadable="true" source="org.eclipse.jst.jee.server:abc"/>
Upvotes: 0
Reputation: 567
Go to [workspace folder]->Servers->[Tomcat folder] then open server.xml
file and search for <Context>
tag. There will be multiple <Context>
tags, remove the duplicates. Restart your server. Hope this helps.
Upvotes: 10
Reputation: 3
This is related to the server.xml
file. I had the same problem, and I just switched to a new workspace and now it works!
Upvotes: 0