<div dir="auto">You can try wrapping the resource handlers in a path handler. If you can provide sample paths and which goes to which resource that would be helpful.</div><div class="gmail_extra"><br><div class="gmail_quote">On Oct 19, 2017 6:22 PM, &quot;Ove Ranheim&quot; &lt;<a href="mailto:oranheim@gmail.com">oranheim@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>How do I handle multiple <span style="font-family:Menlo;font-size:10.5pt;background-color:rgb(255,255,255)">ClassPathResourceMana<wbr>ger(s)?</span></div><div><pre style="background-color:rgb(255,255,255);font-family:Menlo;font-size:10.5pt">undertowWebApp.<wbr>getDeploymentInfo().<wbr>setResourceManager(<span style="color:#000080;font-weight:bold">new </span>ClassPathResourceManager(<wbr>ClassLoaders.tccl(), MvcResourceConfig.<span style="color:#660e7a;font-style:italic">STATIC_<wbr>FOLDER</span>));<br>undertowWebApp.<wbr>getDeploymentInfo().<wbr>setResourceManager(<span style="color:#000080;font-weight:bold">new </span>ClassPathResourceManager(<wbr>ClassLoaders.tccl(), MvcResourceConfig.<span style="color:#660e7a;font-style:italic">WEBJARS_<wbr>RESOURCES</span>));</pre><div>I have different contexts where I want to resolves static files.</div><div><br></div><div>-Ove</div><div><br><blockquote type="cite"><div>On 19 Oct 2017, at 16:35, Bill O&#39;Neil &lt;<a href="mailto:bill@dartalley.com" target="_blank">bill@dartalley.com</a>&gt; wrote:</div><br class="m_-2776587353986560615Apple-interchange-newline"><div><div dir="ltr">You should be able to use a ClassPathResourceManager, something along these lines. This should read files from the classpath which would include the jars. As long as you find the right file path it should work.<div><br></div><div>ResourceManager resourceManager = new ClassPathResourceManager(<wbr>CurrentClass.class.<wbr>getClassLoader(),&quot;someprefix&quot;)<wbr>;<br></div><div><div>ResourceHandler handler = new ResourceHandler(<wbr>resourceManager);</div><div>handler.setCacheTime((int)<wbr>TimeUnit.HOURS.toSeconds(4));</div></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 18, 2017 at 3:50 PM, Ove Ranheim <span dir="ltr">&lt;<a href="mailto:oranheim@gmail.com" target="_blank">oranheim@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi,<div><br></div><div>How do I register a resource handler for webjars.</div><div><br></div><div>E.g. <a href="https://github.com/webjars/bootstrap-sass" target="_blank">https://github.com/webjar<wbr>s/bootstrap-sass</a></div><div><br></div><div>Regards,</div><div>Ove</div><div><br></div></div><br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/undertow-dev</a><br></blockquote></div><br></div>
</div></blockquote></div><br></div></div><br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br></blockquote></div></div>