This is the error that I got when I created my first Axis2 web service using Eclipse. After I wrote the class, I created the web service with Apache Axis2. When I click the start server button in eclipse it gives an error message:
Could not publish server configuration for Tomcat v6.0 Server at localhost.
Multiple contexts have a path of "/FirstApache".
FirstApache is the dynamic web project that I created before. I selected the correct web project from the configuration part in the web service wizard.
How can I fix this?
Multiple Contexts have a path of “/MyProject”. We can solve this problem either from Eclipse IDE itself or by editing a file outside of Eclipse. – There should be multiple definitions for the path of your project.
A context path in Apache Tomcat refers to the name of the website as presented by the browser. For example, imagine I tell you to enter "localhost:8080/DemoWebsite/DateJSP. jsp" in your browser. The context path is "DemoWebsite". The term "context" in Tomcat is in fact synonymous with "website".
Search for the server.xml
file and check your <Context>
tags, probably there are multiple definitions for the same path. Remove the duplicates and it should work for you.
Check out the answer here.
Auto-format the xml file (control + shift + f) since the second <Context>
tag may be on the same line, but outside the viewport and really far away from the visible one.
In STS/Eclipse go to "project explorer" or "package explorer" and
there is a folder called "server." Open it and you will find server.xml
file. Inside this file at the bottom you find a definition like
<Context docBase="myproject" path="/myproject" reloadable="true"
source="org.eclipse.jst.jee.server:myproject"/>
You might find duplicates of the same definition that you would need to remove.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With