If there are two websocket endpoint has same path, eg, path is "/",Tomcat start will report the following errors: Multiple Endpoints may not be deployed to the same path [/] ... But the errors info can't provide us more enough info.We can't know which the two endpoints.If so,we may need to search texts,I think not very convenient. If report the following errors info, we can know which two endpoints: Multiple Endpoints may not be deployed to the same path [/], the first endpoint is [echo.EchoServer], the second endpoint is [echo.annoted.EchoServer] The simple way is to modify WsServerContainer#addEndpoint() method and org/apache/tomcat/websocket/server/LocalStrings.properties. example: #serverContainer.duplicatePaths=Multiple Endpoints may not be deployed to the same path [{0}] serverContainer.duplicatePaths=Multiple Endpoints may not be deployed to the same path [{0}], the first endpoint is [{1}], the second endpoint is [{2}] if (old != null) { // Duplicate path mappings throw new DeploymentException(sm.getString("serverContainer.duplicatePaths", path, old.getEndpointClass().getName(), sec.getEndpointClass().getName())); }
Fixed in trunk in r1665292 and Tomcat 8.0.x in r1665296. Will be in Tomcat 8.0.21.
Note that I do not intend to back-port this to Tomcat 7 unless someone requests it.
Fixed in Tomcat 7 trunk and will be in 7.0.63 onwards.