我在我的嵌入式Jetty應用程序中使用Jersey。我有一個重定向的那樣:Jersey + Embedded Jetty使用HTTP 200代碼重定向
URI uri = URI.create(url);
return Response.seeOther(uri).build();
seeOther是這樣的:
public static ResponseBuilder seeOther(URI location) {
ResponseBuilder b = status(Status.SEE_OTHER).location(location);
return b;
}
但是,這種重定向有303代碼。如果我明確設置位置並傳遞200 OK,它不會重定向。
當我有200 OK狀態時,如何重定向頁面?