users@jersey.java.net

[Jersey] Re: Issue with jersey-freemarker

From: Rob Shepherd <rs_at_datacymru.net>
Date: Mon, 28 May 2012 10:47:29 +0100

> Hello Rob,
>
>
> On 5/23/12 7:38 PM, Rob Shepherd (DataCymru) wrote:
>
> Hi,
>
> [...]
>
> ... I can't seem to fiddle with it to get the
> FreemarkerViewProcessor to kick in and process the template - it
> seems to be falling back to the standard method.
>
> [...]
> Aside the fact that it doesn't work for me - please could somebody
> satisfy my curiosity and inform me how it theoretically could work
> - how jersey know to utilise FreemarkerViewProcessor and not
> <jsp-builtin>?
>
>
> Jersey 1.x uses ServiceFinder to do lookus for various providers and
> this one is in
> META-INF/services/com.sun.jersey.spi.template.ViewProcessor in
> jersey-freemarker.jar.
>
> have you seen jersey freemarker *sample*?
> http://search.maven.org/remotecontent?filepath=com/sun/jersey/samples/freemarker/1.12/freemarker-1.12-project.zip
> . Try it out and maybe compare to what you have. And please let me
> know if you have any remaining issues.
>
> Thanks,
> Pavel

Hi Pavel, thanks very much for your response.

I did use the sample as the starting point, ran the test suite and
examined the code - thank you.

Thanks for your explanation, I understand the ServiceFinder process now,
that is neat.
For some reason - not entirely sure, but probably maven module -SNAPSHOT
"install" related - the contrib FreemarkerViewProcessor is now working
as expected.

In any case, thanks for your help.

Regards

rob

-- 
Rob Shepherd BEng PhD - Director / Senior Engineer - DataCymru Ltd