users@jersey.java.net

Re: ApplicationDescriptor gone?

From: Alexandru Popescu ☀ <the.mindstorm.mailinglist_at_gmail.com>
Date: Fri, 30 Jul 2010 10:15:26 +0300

I got very helpfup answers to all my other questions except this
one... so maybe it passed unobserved.

The documentation on testing seems to be a bit old, so I'd really
appreciate if someone with better knowledge of Jersey could comment on
this.

many thanks in advance,

:- alex

2010/7/29 Alexandru Popescu ☀ <the.mindstorm.mailinglist_at_gmail.com>:
> Hi,
>
> I'm quite new to Jersey and I'm trying to set up one of the sample
> apps: bookstore. While I've got pretty much everything to compile (I'm
> not using maven) there is still one issue with the following code:
>
> [code]
>    public TestSupport() throws Exception {
>        super();
>        Map<String, String> INIT_PARAMS = new HashMap<String, String>();
>        INIT_PARAMS.put("com.sun.jersey.config.feature.Redirect", "true");
>        INIT_PARAMS.put("com.sun.jersey.config.feature.ImplicitViewables",
> "true");
>        INIT_PARAMS.put("com.sun.jersey.config.property.WebPageContentRegex",
>                "/(images|css|jsp)/.*");
>        ApplicationDescriptor  applicationDescriptor = new
> ApplicationDescriptor();
>        applicationDescriptor =
> applicationDescriptor.setContextPath("bookstore")
>
> .setRootResourcePackageName("com.sun.jersey.samples.bookstore.resources")
>                .setServletInitParams(INIT_PARAMS);
>        super.setupTestEnvironment(applicationDescriptor);
>    }
> [/code]
>
> While I'm trying to use Jersey 1.2 (as I might need to run the app on
> 1.5), I haven't been able to find the ApplicationDescriptor class
> (com.sun.jersey.test.framework.util.ApplicationDescriptor) in any of
> the 1.1.5, 1.2 or 1.3.
>
> So I guess the whole thing changed. I have checked the documentation
> which links to a blog post that mentions exactly the same class. I've
> performed a couple of searches on the mailing list to find out how to
> replace/where to find it, but no success.
>
> Could you please point me to the right direction?
>
> thanks,
>
> :- alex
>