<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'Neil <<a href="mailto:bill@dartalley.com">bill@dartalley.com</a>> 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'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"><<a href="mailto:greg.hellings@gmail.com" target="_blank">greg.hellings@gmail.com</a>></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't used it extensively, but in my own local testing it seems to<br>
work exactly the way I wanted - it'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'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 <<a href="mailto:oliver@analyticspot.com" target="_blank">oliver@analyticspot.com</a>> wrote:<br>
> Hey all,<br>
><br>
> I haven't seen any documentation on the format of a template accepted by a<br>
> PathTemplateHandler. I know the basics: "/foo", "/foo/{userId}", etc. but<br>
> are wildcards allowed? Is there a way to specify a handler for anything with<br>
> a certain prefix? If two handlers would match how is the tie broken, etc.<br>
><br>
> Thanks,<br>
> Oliver<br>
> --<br>
> CTO, Analytic Spot<br>
> 44 West Broadway #222<br>
> Eugene, OR 97401<br>
> <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>
> <a href="http://www.linkedin.com/in/oliverdain" rel="noreferrer" target="_blank">www.linkedin.com/in/oliverdain</a><br>
><br>
</div></div>> _______________________________________________<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><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:'helvetica neue';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>