开发者

How to indicate one or more match in url pattern?

开发者 https://www.devze.com 2023-04-05 15:14 出处:网络
\"/*\" will match zero or more characters. I want to serve req开发者_如何学JAVAuest if there is a one or more characters

"/*" will match zero or more characters. I want to serve req开发者_如何学JAVAuest if there is a one or more characters proceeding the "/" character.

Note: I am using Guice's Servlet Module to configure the request.

Thanks!


I think you can just do this, assuming you mean that you want to matching anything with a / and 1 or more characters after it (so /foo and /a but not /).

serveRegex("/.+")


in general regex:

/+

dont know if it works here tough ..?

http://code.google.com/p/google-guice/wiki/ServletRegexKeyMapping

0

精彩评论

暂无评论...
验证码 换一张
取 消