users@jersey.java.net

Re: [Jersey] serving static content from a resource

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Thu, 11 Feb 2010 12:18:38 -0700

I am using velocity. I would like to get rid of the Velocity servlet and use the template processor instead.

I hope this is possible.

On Feb 11, 2010, at 12:05 PM, Jan Algermissen wrote:

>
> On Feb 11, 2010, at 7:54 PM, Arul Dhesiaseelan wrote:
>
>> Hi,
>>
>> Is it possible to serve static content from a resource?
>>
>> I would like to render HTML from a resource method using explicit MVC, something like:
>>
>> @Path("/")
>> public class RootResource {
>>
>> @Produces(MediaType.TEXT_HTML)
>> @GET
>> public Viewable getHomePage() {
>> return new Viewable("/home.html", null);
>
>
> Why don't you put that HTML file in a static loocation of your WAR?
>
> Jan
>
>
>> }
>> }
>>
>> Would this work?
>>
>> Thank you,
>> Arul
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
> -----------------------------------
> Jan Algermissen, Consultant
> NORD Software Consulting
>
> Mail: algermissen_at_acm.org
> Blog: http://www.nordsc.com/blog/
> Work: http://www.nordsc.com/
> -----------------------------------
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>