users@jersey.java.net

[Jersey] 回复: JerseyUriBuilder.path(java.lang.String) not work!

From: joey.lv <joey.lv_at_7road.com>
Date: Wed, 7 May 2014 18:34:30 +0800

Sorry, it's my mistake, in browser, the URI "http://localhost:8080/rest/../index.jsp" just direct to http://localhost:8080/index.jsp

发件人: joey.lv
发送时间: 2014-05-07 16:25
收件人: users
主题: [Jersey] JerseyUriBuilder.path(java.lang.String) not work!
hi, all

Jersey 2.7 / 2.8

if
uriInfo.getBaseUriBuilder() = http://localhost:8080/rest/,

then
uriInfo.getBaseUriBuilder().path("../index.jsp").build() should return http://localhost:8080/index.jsp instead of http://localhost:8080/rest/../index.jsp


but somebody said it worked in older version:

http://stackoverflow.com/questions/15145088/jersey-redirect-outside-of-jersey-root