开发者

How to process any request of the type example.com/request?

开发者 https://www.devze.com 2023-03-25 12:18 出处:网络
Suppose I own say add-one.com and if I receive add-one.com/23 I want to capture开发者_运维问答 \'23\' and then display 24 to the user (for example http://dictionary.reference.com/browse/overflow or an

Suppose I own say add-one.com and if I receive add-one.com/23 I want to capture开发者_运维问答 '23' and then display 24 to the user (for example http://dictionary.reference.com/browse/overflow or any other word) instead of throwing a 404 error. How could I do this? I do not want to do anything like add-one.com/process.php?number=23.


Looks like you want the request path. Take a look at the following examples on THIS page. It should help you get started.

For more complex projects, you should also get familiar with the basics of REST. You can then start using Jersey, a framework for building RESTful web services in Java.

0

精彩评论

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