开发者

Multiple base paths in Jersey REST?

The web application I'm working is currently using REST to expose functionality to a iPhone application.

All iPhone REST URLs are in the format /mobile/*.

We're now looking to provide a RESTful API for public use. These addresses will be a format like /rest/*.

The issue is we need these new /rest/* addresses to开发者_如何学Python work alongside the current /mobile/* (which can't be changed due to backwards compatibility issues).

I'm having trouble seeing how this can be done, though. Any ideas?


Just configure 2 servlets in your web.xml - one with /rest/* mapping and the other one with /mobile/* mapping. You can include the same resources in both.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜