<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><br></div>I&#39;d appreciate help in understanding how to setup handlers. I want paths that begin with &quot;/api&quot; to be handled by JAXRS and all others to be handled by the file resource manager. <br>

<br>I&#39;m confused as to why using the defaultContainer works, but using a servlet container factory instance doesn&#39;t. When I use the defaultContainer approach, executing a curl GET command against <a href="http://localhost:8080/api/example" target="_blank">http://localhost:8080/api/example</a> works as expected, however, if I use the servlet container factory, the endpoint is not found.<br>

<br>  DeploymentManager manager = Servlets.defaultContainer().addDeployment(deployInfo);<br><br></div>// But if I switch the container to:<br>// ServletContainer.Factory.newInstance().addDeployment(deployInfo)<br></div>// and add a path handler:<br>

// private final PathHandler pathHandler = new PathHandler();<br>// pathHandler.addExactPath(&quot;/api&quot;, manager.start());<br></div>// and then set the handler:<br></div>// .setHandler(pathHandler)<br></div>// the endpoint(s) aren&#39;t found<br>

<div><div><br><div><div><div>    try {<br>        server = Undertow.builder()<br>                 .addHttpListener((int) conf.get(&quot;port&quot;), conf.get(&quot;host&quot;).toString())<br>                 .setHandler(manager.start())<br>

                 .build();<br>    } catch (NumberFormatException | ServletException e) {<br>        logger.error(&quot;Undertow server build error: {}&quot;, e.getMessage());<br>    }<br><br><br><br></div><div>Thanks.<span class="HOEnZb"><font color="#888888"><br>

<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-Ari<br></div></font></span></div></div></div></div></div>
</div><br></div>