Getting part of request url inside servlet

后端 未结 2 1295
旧时难觅i
旧时难觅i 2021-02-05 14:51

I have an EmailVerification Servlet mapped with /ev/* url-pattern.

http://example.com/ev/ce52320570

How can I get thi

2条回答
  •  忘了有多久
    2021-02-05 15:16

    Use request.getRequestURI() and remove what you don't need, i.e. request.getRequestURI().replace("/ev/");

提交回复
热议问题