users@jersey.java.net

Re: [Jersey] Re: ApplicationDescriptor gone?

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Fri, 30 Jul 2010 10:17:41 +0200

On Jul 30, 2010, at 9:15 AM, Alexandru Popescu ☀ wrote:

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

No, people are busy and work in various time-zones :-)


> 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.
>

Pavel can answer this.

Paul.

> 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
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>