Jersey URL forwarding

前端 未结 3 1160
心在旅途
心在旅途 2021-02-14 21:24

Inside a Jersey REST method I would like to forward to an another website. How can I achieve that?

@Path(\"/\")
public c         


        
3条回答
  •  悲&欢浪女
    2021-02-14 22:06

    public Response foo()
    {
        URI uri = UriBuilder.fromUri( ).build();
        return Response.seeOther( uri ).build();
    }
    

    I used above code in my application and it works.

提交回复
热议问题