Any hints? I would really appreciate if someone could provide some pointers 
(e.g. classes involved etc) about the implementation of the mechanism used to 
discover and deploy endpoints; I will then try to study the code in order to 
figure out why it doesn't work when I set jarScanner.setScanClassPath(false)

Thanks,

Jacopo

On Feb 14, 2014, at 7:58 PM, Jacopo Cappellato <jacopo.cappell...@gmail.com> 
wrote:

> Here is the client code that I use to recreate the "problem":
> 
>    public static void main(String[] args) throws Exception {
> 
>        String currentDir = new File(".").getCanonicalPath();
>        String tomcatDir = currentDir + File.separatorChar + "tomcat";
>        String webRoot = currentDir + File.separatorChar + "examples";
> 
>        Tomcat tomcat = new Tomcat();
>        tomcat.setBaseDir(tomcatDir);
>        tomcat.setPort(8080);
> 
>        tomcat.addWebapp("/examples", webRoot);
> 
>        // this code gets the JarScanner and sets scanClassPath to false:
>        // with this setting the websockets are not deployed
>        Container[] containers = 
> tomcat.getService().getContainer().findChildren();
>        StandardHost host = (StandardHost)containers[0];
>        containers = host.findChildren();
>        StandardContext ctx = (StandardContext)containers[0];
>        StandardJarScanner jarScanner = 
> (StandardJarScanner)ctx.getJarScanner();
>        jarScanner.setScanClassPath(false); // if this is set to true the 
> websockets are deployed successfully
> 
>        tomcat.start();
> 
>        while (true) {
>            Thread.sleep(999999999);
>        }
>    }
> 
> I run this code from a folder containing the "examples" webapp and the Tomcat 
> jars.
> 
> Is there a way to deploy successfully the websockets with 
> setScanClassPath(false) ?
> 
> Thanks,
> 
> Jacopo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to