Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要与getRequestURI()完全相同的方法,但我想在引用者上使用它。这可能吗?
我想http://www.example.com/my/path?vars=true变成/my/path
http://www.example.com/my/path?vars=true
/my/path
你想要这样的东西吗?
String refererURI = new URI(request.getHeader("referer")).getPath();