从以下URL中,我需要单独获取
也就是说我需要删除
(http://localhost:9090/dts)
。也就是说我需要删除
(documents/savedoc)
,或者只需要获取- (http://localhost:9090/dts)
。http://localhost:9090/dts/documents/savedoc
有没有办法在请求中获得上述内容?我尝试过以下方法并得到了结果,但仍在继续尝试。System.out.println("URL****************"+request.getRequestURL().toString());
System.out.println("URI****************"+request.getRequestURI().toString());
System.out.println("ContextPath****************"+request.getContextPath().toString());
URL****************http://localhost:9090/dts/documents/savedoc
URI****************/dts/documents/savedoc
ContextPath****************/dts
有人能帮我修复这个问题吗?