-1
나는 RESTEasy가 3.1.4-최종를 사용하고 내가하는 방법이 있습니다RESTEasy를 사용하여 html 페이지로 리디렉션하는 방법은 무엇입니까?
@GET
@Produces(MediaType.TEXT_HTML)
public Response getInteractionsData(@Context UriInfo ui) {
return Response.ok().entity("index.html").build();
}
어떻게 된 index.html로 리디렉션을? 이제 일반 텍스트 "index.html"(응답 헤더 텍스트/html)을 얻습니다.
RequestDispatcher dispatcher = request.getRequestDispatcher("index.html");
if (dispatcher != null) {
dispatcher.forward(request, response);
}
을하지만 지금은 요청 또는 응답을 가질 수 없습니다 : 또한 나는이 목표를위한 서블릿 API를 사용하기 전에 https://docs.oracle.com/cd/E19776-01/820-4867/ghrpv/
참조하십시오. 내 나쁜 영어
감사합니다! index.html 파일의 위치를 알려주시겠습니까? –
정확한 설정을 보지 않고도 말할 수 없지만 위의 코드를 실행하는 모든 예외는 단서를 제공합니다. – PillHead