开发者

Multiple base paths in Jersey REST?

开发者 https://www.devze.com 2023-04-05 23:12 出处:网络
The web application I\'m working is currently using REST to expose functionality to a iPhone application.

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

精彩评论

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