<div dir="ltr">Thanks Greg and Bill!</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 7, 2016 at 6:20 AM Bill O&#39;Neil &lt;<a href="mailto:bill@dartalley.com">bill@dartalley.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I did something similar to Greg by delegating to a RoutingHandler which has a PathHandler fallback.<div><br></div><div><a href="https://gist.github.com/billoneil/08b1648a3b2a849e02c57e133bd6d45c" target="_blank">https://gist.github.com/billoneil/08b1648a3b2a849e02c57e133bd6d45c</a><br></div><div><br></div><div>This allows me to add prefix routes but still not flexible enough for all uses cases. The main drawback with this approach is the prefix handler doesn&#39;t route based on Verb but it has worked for all of my use cases so far.</div><div><br></div><div>I would also like to know if there is a way the RoutingHandler can be extended to have wildcard functionality.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 7, 2016 at 8:08 AM, Greg Hellings <span dir="ltr">&lt;<a href="mailto:greg.hellings@gmail.com" target="_blank">greg.hellings@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">Oliver,<br>
<br>
I found it very difficult to work with the PathTemplateHandler and its<br>
set of matching operations seemed very minimal to me. I also found no<br>
efficient way to mix-and-match between full Paths and PathTemplate<br>
entries. So I created my own handler class that gave the ability to<br>
match based on both HTTP Verb and various path components.<br>
<br>
<a href="https://github.com/greg-hellings/gully/blob/master/src/main/java/com/thehellings/gully/Router.java" rel="noreferrer" target="_blank">https://github.com/greg-hellings/gully/blob/master/src/main/java/com/thehellings/gully/Router.java</a><br>
<a href="https://github.com/greg-hellings/gully/blob/master/src/main/java/com/thehellings/gully/PlainRouter.java" rel="noreferrer" target="_blank">https://github.com/greg-hellings/gully/blob/master/src/main/java/com/thehellings/gully/PlainRouter.java</a><br>
<br>
I haven&#39;t used it extensively, but in my own local testing it seems to<br>
work exactly the way I wanted - it&#39;s still just an HttpHandler<br>
underneath, so it can be placed anywhere in a handler chain. And it<br>
operates on the result of getRelativePath, so you can nest them within<br>
each other, or place them within other components in a handler chain<br>
and the class should operate properly.<br>
<br>
The whole set of handler and its dependent classes should be available<br>
as a Maven artifact if you want to play with it. If this sort of<br>
functionality exists somewhere in core Undertow, I&#39;ve been entirely<br>
unable to decipher it and locate its functioning.<br>
<br>
--Greg<br>
<div><div><br>
On Tue, Sep 6, 2016 at 9:41 PM, Oliver Dain &lt;<a href="mailto:oliver@analyticspot.com" target="_blank">oliver@analyticspot.com</a>&gt; wrote:<br>
&gt; Hey all,<br>
&gt;<br>
&gt; I haven&#39;t seen any documentation on the format of a template accepted by a<br>
&gt; PathTemplateHandler. I know the basics: &quot;/foo&quot;, &quot;/foo/{userId}&quot;, etc. but<br>
&gt; are wildcards allowed? Is there a way to specify a handler for anything with<br>
&gt; a certain prefix? If two handlers would match how is the tie broken, etc.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Oliver<br>
&gt; --<br>
&gt; CTO, Analytic Spot<br>
&gt; 44 West Broadway #222<br>
&gt; Eugene, OR 97401<br>
&gt; <a href="http://analyticspot.com" rel="noreferrer" target="_blank">analyticspot.com</a> • <a href="tel:425-296-6556" value="+14252966556" target="_blank">425-296-6556</a><br>
&gt; <a href="http://www.linkedin.com/in/oliverdain" rel="noreferrer" target="_blank">www.linkedin.com/in/oliverdain</a><br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
<br>
_______________________________________________<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/mailman/listinfo/undertow-dev</a></blockquote></div><br></div>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:small"><div style="font-size:13px;line-height:19.5px">CTO, Analytic Spot</div><div style="font-size:13px;line-height:19.5px">44 West Broadway #222</div><div style="font-size:13px;line-height:19.5px">Eugene, OR 97401<br></div><div style="font-size:13px;line-height:19.5px"><a href="http://analyticspot.com/" style="z-index: 0;">analyticspot.com</a> <span style="color:rgb(127,127,127);font-family:&#39;helvetica neue&#39;;font-size:11px;line-height:normal">• </span>425-296-6556</div></div><div style="font-size:small"><span style="line-height:19.5px"><a href="http://www.linkedin.com/in/oliverdain" style="z-index: 0;">www.linkedin.com/in/oliverdain</a></span></div></div></div>