users@jersey.java.net

[Jersey] Change port number of grizzly web container in Jersey testframework

From: <h.hitz_at_gmx.ch>
Date: Sun, 19 Jun 2011 14:17:12 +0000 (GMT)

Hello everybody
I'm using jersey testframework to stub services that will be used in my
project under test. I need to change the port number of the grizzly web
container because our REST-Services are listening on different port
number as grizzli webtest default port
(9998).
How can I do that? Can somebody provide me a code snipplet?

Many thanks in advance
Hansueli Hitz

My code for starting grizzli web container:

public class ActivitiJerseyStubTest extends JerseyTest{

    public ActivitiJerseyStubTest() throws Exception {

    super(new
WebAppDescriptor.Builder("ch.triemli.proc.hflow.srvcstub")
        .contextPath("hFlow")
        .servletPath("/rs")
        .build());

    }

        @Rule
        public ActivitiRule activitiRule = new ActivitiRule();
        ......