tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1416031 - in /tomcat/trunk/java/org/apache/tomcat/websocket: ServerContainerImpl.java WsSci.java
Date Sat, 01 Dec 2012 18:01:23 GMT
Author: markt
Date: Sat Dec  1 18:01:22 2012
New Revision: 1416031

URL: http://svn.apache.org/viewvc?rev=1416031&view=rev
Log:
Generate the servlet mapping a little later as we need the published path for the POJO method
mapping

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
    tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1416031&r1=1416030&r2=1416031&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Sat Dec  1 18:01:22
2012
@@ -106,15 +106,17 @@ public class ServerContainerImpl extends
 
         ServerEndpointConfiguration config =
                 (ServerEndpointConfiguration) ep.getEndpointConfiguration();
-        String path = Util.getServletMappingPath(config.getPath());
+        String path = config.getPath();
+        String mappingPath = Util.getServletMappingPath(path);
 
         if (log.isDebugEnabled()) {
             log.debug(sm.getString("serverContainer.endpointDeploy",
                     clazz.getName(), path, servletContext.getContextPath()));
         }
 
-        endpointMap.put(path.substring(0, path.length() - 2), clazz);
-        addWsServletMapping(path);
+        endpointMap.put(
+                mappingPath.substring(0, mappingPath.length() - 2), clazz);
+        addWsServletMapping(mappingPath);
     }
 
 
@@ -148,9 +150,11 @@ public class ServerContainerImpl extends
                     path, servletContext.getContextPath()));
         }
 
-        pojoMap.put(path.substring(0, path.length() - 2), pojo);
+        String mappingPath = Util.getServletMappingPath(path);
+
+        pojoMap.put(mappingPath.substring(0, mappingPath.length() - 2), pojo);
         pojoMethodMap.put(pojo, new PojoMethodMapping(pojo, path));
-        addWsServletMapping(path);
+        addWsServletMapping(mappingPath);
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java?rev=1416031&r1=1416030&r2=1416031&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java Sat Dec  1 18:01:22 2012
@@ -47,8 +47,7 @@ public class WsSci implements ServletCon
         for (Class<?> clazz : clazzes) {
             WebSocketEndpoint anotation =
                     clazz.getAnnotation(WebSocketEndpoint.class);
-            String mappingPath = Util.getServletMappingPath(anotation.value());
-            sc.publishServer(clazz, ctx, mappingPath);
+            sc.publishServer(clazz, ctx, anotation.value());
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message