Eclipse Luna - Getting Error - "Failed to publish server configuration for Tomcat v7.0 Server on localhost. Several contexts have path" / abc "

I use Eclipse Luna and get

Failed to publish server configuration for Tomcat v7.0 Server on localhost.
Several contexts have a / TestProject path.

However, I can fix this by creating a path for docbase = /in the context line in server.xml, as in the contextdocBase="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 the path attribute plays in the context and how to fix it forever. I saw the path carry over when I copy the application to another application.

+4
source share
4 answers

[ ] β†’ β†’ [ Tomcat], server.xml <Context>. <Context>, . . , .

+9

server.xml. , , !

0

Go to the [workspace] β†’ Servers β†’ [Tomcat folder] folder, then open the server.xml file and find the Context tag . There will be several Context tags , remove duplicates. something like that -

< Context  docBase="service-name" path="/path of your service" reloadable="true" 
    source="org.eclipse.jst.jee.server:your-service-name" />  
< Context >................... /> 

remove this second Conyext tag .

0
source

In your eclipse tomcat open server.xml and search for "/ abc", you will get this line, leave only one and delete duplicate lines

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

All Articles