You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Borut Bolčina <bo...@gmail.com> on 2010/08/12 18:15:59 UTC

tapestry-jersey

Hello,

perhaps this should go to tynamo user list, but I guess no one will mind
posting this here.

I am successfully using tapestry-resteasy integration module, but have come
to a dead-end on a JSONP issue. I wanted my web service to return a JSON
wrapped in a javascript callback function and found out that resteasy does
not support this. See https://jira.jboss.org/browse/RESTEASY-342

Now, the Jersey library can do this. See

http://java.dzone.com/articles/jersey-featuring-jquery-jsonp?utm_source=feedburner
and
http://persistentdesigns.com/wp/?p=233

It is all about the
@Produces( { application/x-javascript, MediaType.APPLICATION_JSON,
MediaType.APPLICATION_XML })
and
@QueryParam("jsoncallback") @DefaultValue("fn") String callback

Of course I could live without this, I can just return concatenated String,
but that does not "feel right", well it would be ugly.

Before looking at the source code for tynamo-resteasy, how hard would it be
to write tapestry-jersey integration module?

Best,
Borut

Re: tapestry-jersey

Posted by Borut Bolčina <bo...@gmail.com>.
Uf, thanks! Is there a T5 wiki reference to it? I will try it.

-Borut

2010/8/13 Alejandro Scandroli <al...@gmail.com>

> Hi Borut
>
> Do you know http://wiki.github.com/yunglin/tapestry-jersey/ ?
> I haven't tried it, but it sure looks like what you are looking for.
>
> Cheers.
> Alejandro.
>
> On Thu, Aug 12, 2010 at 7:05 PM, Kalle Korhonen
> <ka...@gmail.com> wrote:
> > On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com>
> wrote:
> >> perhaps this should go to tynamo user list, but I guess no one will mind
> >> posting this here.
> >> Before looking at the source code for tynamo-resteasy, how hard would it
> be
> >> to write tapestry-jersey integration module?
> >
> > Not that hard :) In all seriousness, you probably *do* want to look at
> > the source code of Tynamo's tapestry-resteasy. There isn't that much
> > but I'm sure it'd be way easier to mimic that code than write it all
> > from scratch. I'm a fan of Jersey and used to use it heavily before -
> > not with Tapestry though. If you are serious about writing it, I could
> > very well see Tynamo hosting a tapestry-jersey module. The situation
> > would be similar to native hibernate and JPA modules we offer. Feel
> > free to put it up on google code or github or just keep the
> > implementation to yourself. You know, publishing code is a
> > double-edged sword - it raises the bar and as soon as you share it,
> > the pesky users crop up from everywhere and start demanding
> > improvements. On the other hand, you might get a few free bug fixes ;)
> >
> > Kalle
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: tapestry-jersey

Posted by Andreas Andreou <an...@di.uoa.gr>.
Probably JerseyRequestFilter.java needs a fix so that it makes use of
the current
context... I guess you can add an issue to
http://github.com/yunglin/tapestry-jersey
or even better fork it

On Mon, Aug 16, 2010 at 23:04, Borut Bolčina <bo...@gmail.com> wrote:
> Fount the solution:
>
> You have to configure the jetty not to use default context path (
> <artifactId>) like so:
>
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty-plugin</artifactId>
> <version>6.1.22</version>
> <configuration>
> <contextPath>/</contextPath>
> <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
> <append>true</append>
> </requestLog>
> </configuration>
> </plugin>
>
> And now the Jersey responds at:
> http://localhost:8080/rest/helloworld
>
> -Borut
>
> 2010/8/16 Borut Bolčina <bo...@gmail.com>
>
>> I cloned the "trunk" of the tapestry-jersey and run it against simple
>> T5.1.0.5 (and T5.2) project, but without success. My tiny test webapp is not
>> responding at http://localhost:8080/myjerseytest/rest/helloworld
>>
>> <http://localhost:8080/myjerseytest/rest/helloworld>-Borut
>>
>> dep tree:
>> [INFO] The following files have been resolved:
>> [INFO]    asm:asm:jar:3.1:compile
>> [INFO]    com.bluetangstudio:tapestry-jersey:jar:1.0.3-SNAPSHOT:compile
>> [INFO]    com.sun.jersey:jersey-core:jar:1.3:compile
>> [INFO]    com.sun.jersey:jersey-server:jar:1.3:compile
>> [INFO]    commons-codec:commons-codec:jar:1.3:compile
>> [INFO]    javassist:javassist:jar:3.9.0.GA:compile
>> [INFO]    javax.servlet:servlet-api:jar:2.5:provided
>> [INFO]    javax.ws.rs:jsr311-api:jar:1.1.1:compile
>> [INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
>> [INFO]    junit:junit:jar:3.8.1:test
>> [INFO]    log4j:log4j:jar:1.2.14:compile
>> [INFO]    org.antlr:antlr-runtime:jar:3.1.1:compile
>> [INFO]    org.apache.tapestry:tapestry-core:jar:5.1.0.5:compile
>> [INFO]    org.apache.tapestry:tapestry-ioc:jar:5.1.0.5:compile
>> [INFO]    org.apache.tapestry:tapestry5-annotations:jar:5.1.0.5:compile
>> [INFO]    org.codehaus.woodstox:stax2-api:jar:3.0.1:compile
>> [INFO]    org.codehaus.woodstox:woodstox-core-asl:jar:4.0.3:compile
>> [INFO]    org.easymock:easymock:jar:2.4:test
>> [INFO]    org.slf4j:slf4j-api:jar:1.5.2:compile
>> [INFO]    org.slf4j:slf4j-log4j12:jar:1.5.2:compile
>> [INFO]    org.testng:testng:jar:5.12.1:test
>> [INFO]    stax:stax-api:jar:1.0.1:compile
>>
>> 2010/8/13 Alejandro Scandroli <al...@gmail.com>
>>
>>> Hi Borut
>>>
>>>
>>> Do you know http://wiki.github.com/yunglin/tapestry-jersey/ ?
>>> I haven't tried it, but it sure looks like what you are looking for.
>>>
>>> Cheers.
>>> Alejandro.
>>>
>>> On Thu, Aug 12, 2010 at 7:05 PM, Kalle Korhonen
>>> <ka...@gmail.com> wrote:
>>> > On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com>
>>> wrote:
>>> >> perhaps this should go to tynamo user list, but I guess no one will
>>> mind
>>> >> posting this here.
>>> >> Before looking at the source code for tynamo-resteasy, how hard would
>>> it be
>>> >> to write tapestry-jersey integration module?
>>> >
>>> > Not that hard :) In all seriousness, you probably *do* want to look at
>>> > the source code of Tynamo's tapestry-resteasy. There isn't that much
>>> > but I'm sure it'd be way easier to mimic that code than write it all
>>> > from scratch. I'm a fan of Jersey and used to use it heavily before -
>>> > not with Tapestry though. If you are serious about writing it, I could
>>> > very well see Tynamo hosting a tapestry-jersey module. The situation
>>> > would be similar to native hibernate and JPA modules we offer. Feel
>>> > free to put it up on google code or github or just keep the
>>> > implementation to yourself. You know, publishing code is a
>>> > double-edged sword - it raises the bar and as soon as you share it,
>>> > the pesky users crop up from everywhere and start demanding
>>> > improvements. On the other hand, you might get a few free bug fixes ;)
>>> >
>>> > Kalle
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> > For additional commands, e-mail: users-help@tapestry.apache.org
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-jersey

Posted by Borut Bolčina <bo...@gmail.com>.
Fount the solution:

You have to configure the jetty not to use default context path (
<artifactId>) like so:

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.22</version>
<configuration>
<contextPath>/</contextPath>
<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<append>true</append>
</requestLog>
</configuration>
</plugin>

And now the Jersey responds at:
http://localhost:8080/rest/helloworld

-Borut

2010/8/16 Borut Bolčina <bo...@gmail.com>

> I cloned the "trunk" of the tapestry-jersey and run it against simple
> T5.1.0.5 (and T5.2) project, but without success. My tiny test webapp is not
> responding at http://localhost:8080/myjerseytest/rest/helloworld
>
> <http://localhost:8080/myjerseytest/rest/helloworld>-Borut
>
> dep tree:
> [INFO] The following files have been resolved:
> [INFO]    asm:asm:jar:3.1:compile
> [INFO]    com.bluetangstudio:tapestry-jersey:jar:1.0.3-SNAPSHOT:compile
> [INFO]    com.sun.jersey:jersey-core:jar:1.3:compile
> [INFO]    com.sun.jersey:jersey-server:jar:1.3:compile
> [INFO]    commons-codec:commons-codec:jar:1.3:compile
> [INFO]    javassist:javassist:jar:3.9.0.GA:compile
> [INFO]    javax.servlet:servlet-api:jar:2.5:provided
> [INFO]    javax.ws.rs:jsr311-api:jar:1.1.1:compile
> [INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
> [INFO]    junit:junit:jar:3.8.1:test
> [INFO]    log4j:log4j:jar:1.2.14:compile
> [INFO]    org.antlr:antlr-runtime:jar:3.1.1:compile
> [INFO]    org.apache.tapestry:tapestry-core:jar:5.1.0.5:compile
> [INFO]    org.apache.tapestry:tapestry-ioc:jar:5.1.0.5:compile
> [INFO]    org.apache.tapestry:tapestry5-annotations:jar:5.1.0.5:compile
> [INFO]    org.codehaus.woodstox:stax2-api:jar:3.0.1:compile
> [INFO]    org.codehaus.woodstox:woodstox-core-asl:jar:4.0.3:compile
> [INFO]    org.easymock:easymock:jar:2.4:test
> [INFO]    org.slf4j:slf4j-api:jar:1.5.2:compile
> [INFO]    org.slf4j:slf4j-log4j12:jar:1.5.2:compile
> [INFO]    org.testng:testng:jar:5.12.1:test
> [INFO]    stax:stax-api:jar:1.0.1:compile
>
> 2010/8/13 Alejandro Scandroli <al...@gmail.com>
>
>> Hi Borut
>>
>>
>> Do you know http://wiki.github.com/yunglin/tapestry-jersey/ ?
>> I haven't tried it, but it sure looks like what you are looking for.
>>
>> Cheers.
>> Alejandro.
>>
>> On Thu, Aug 12, 2010 at 7:05 PM, Kalle Korhonen
>> <ka...@gmail.com> wrote:
>> > On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com>
>> wrote:
>> >> perhaps this should go to tynamo user list, but I guess no one will
>> mind
>> >> posting this here.
>> >> Before looking at the source code for tynamo-resteasy, how hard would
>> it be
>> >> to write tapestry-jersey integration module?
>> >
>> > Not that hard :) In all seriousness, you probably *do* want to look at
>> > the source code of Tynamo's tapestry-resteasy. There isn't that much
>> > but I'm sure it'd be way easier to mimic that code than write it all
>> > from scratch. I'm a fan of Jersey and used to use it heavily before -
>> > not with Tapestry though. If you are serious about writing it, I could
>> > very well see Tynamo hosting a tapestry-jersey module. The situation
>> > would be similar to native hibernate and JPA modules we offer. Feel
>> > free to put it up on google code or github or just keep the
>> > implementation to yourself. You know, publishing code is a
>> > double-edged sword - it raises the bar and as soon as you share it,
>> > the pesky users crop up from everywhere and start demanding
>> > improvements. On the other hand, you might get a few free bug fixes ;)
>> >
>> > Kalle
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: tapestry-jersey

Posted by Borut Bolčina <bo...@gmail.com>.
I cloned the "trunk" of the tapestry-jersey and run it against simple
T5.1.0.5 (and T5.2) project, but without success. My tiny test webapp is not
responding at http://localhost:8080/myjerseytest/rest/helloworld

<http://localhost:8080/myjerseytest/rest/helloworld>-Borut

dep tree:
[INFO] The following files have been resolved:
[INFO]    asm:asm:jar:3.1:compile
[INFO]    com.bluetangstudio:tapestry-jersey:jar:1.0.3-SNAPSHOT:compile
[INFO]    com.sun.jersey:jersey-core:jar:1.3:compile
[INFO]    com.sun.jersey:jersey-server:jar:1.3:compile
[INFO]    commons-codec:commons-codec:jar:1.3:compile
[INFO]    javassist:javassist:jar:3.9.0.GA:compile
[INFO]    javax.servlet:servlet-api:jar:2.5:provided
[INFO]    javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]    junit:junit:jar:3.8.1:test
[INFO]    log4j:log4j:jar:1.2.14:compile
[INFO]    org.antlr:antlr-runtime:jar:3.1.1:compile
[INFO]    org.apache.tapestry:tapestry-core:jar:5.1.0.5:compile
[INFO]    org.apache.tapestry:tapestry-ioc:jar:5.1.0.5:compile
[INFO]    org.apache.tapestry:tapestry5-annotations:jar:5.1.0.5:compile
[INFO]    org.codehaus.woodstox:stax2-api:jar:3.0.1:compile
[INFO]    org.codehaus.woodstox:woodstox-core-asl:jar:4.0.3:compile
[INFO]    org.easymock:easymock:jar:2.4:test
[INFO]    org.slf4j:slf4j-api:jar:1.5.2:compile
[INFO]    org.slf4j:slf4j-log4j12:jar:1.5.2:compile
[INFO]    org.testng:testng:jar:5.12.1:test
[INFO]    stax:stax-api:jar:1.0.1:compile

2010/8/13 Alejandro Scandroli <al...@gmail.com>

> Hi Borut
>
> Do you know http://wiki.github.com/yunglin/tapestry-jersey/ ?
> I haven't tried it, but it sure looks like what you are looking for.
>
> Cheers.
> Alejandro.
>
> On Thu, Aug 12, 2010 at 7:05 PM, Kalle Korhonen
> <ka...@gmail.com> wrote:
> > On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com>
> wrote:
> >> perhaps this should go to tynamo user list, but I guess no one will mind
> >> posting this here.
> >> Before looking at the source code for tynamo-resteasy, how hard would it
> be
> >> to write tapestry-jersey integration module?
> >
> > Not that hard :) In all seriousness, you probably *do* want to look at
> > the source code of Tynamo's tapestry-resteasy. There isn't that much
> > but I'm sure it'd be way easier to mimic that code than write it all
> > from scratch. I'm a fan of Jersey and used to use it heavily before -
> > not with Tapestry though. If you are serious about writing it, I could
> > very well see Tynamo hosting a tapestry-jersey module. The situation
> > would be similar to native hibernate and JPA modules we offer. Feel
> > free to put it up on google code or github or just keep the
> > implementation to yourself. You know, publishing code is a
> > double-edged sword - it raises the bar and as soon as you share it,
> > the pesky users crop up from everywhere and start demanding
> > improvements. On the other hand, you might get a few free bug fixes ;)
> >
> > Kalle
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: tapestry-jersey

Posted by Alejandro Scandroli <al...@gmail.com>.
Hi Borut

Do you know http://wiki.github.com/yunglin/tapestry-jersey/ ?
I haven't tried it, but it sure looks like what you are looking for.

Cheers.
Alejandro.

On Thu, Aug 12, 2010 at 7:05 PM, Kalle Korhonen
<ka...@gmail.com> wrote:
> On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com> wrote:
>> perhaps this should go to tynamo user list, but I guess no one will mind
>> posting this here.
>> Before looking at the source code for tynamo-resteasy, how hard would it be
>> to write tapestry-jersey integration module?
>
> Not that hard :) In all seriousness, you probably *do* want to look at
> the source code of Tynamo's tapestry-resteasy. There isn't that much
> but I'm sure it'd be way easier to mimic that code than write it all
> from scratch. I'm a fan of Jersey and used to use it heavily before -
> not with Tapestry though. If you are serious about writing it, I could
> very well see Tynamo hosting a tapestry-jersey module. The situation
> would be similar to native hibernate and JPA modules we offer. Feel
> free to put it up on google code or github or just keep the
> implementation to yourself. You know, publishing code is a
> double-edged sword - it raises the bar and as soon as you share it,
> the pesky users crop up from everywhere and start demanding
> improvements. On the other hand, you might get a few free bug fixes ;)
>
> Kalle
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-jersey

Posted by Kalle Korhonen <ka...@gmail.com>.
On Thu, Aug 12, 2010 at 9:15 AM, Borut Bolčina <bo...@gmail.com> wrote:
> perhaps this should go to tynamo user list, but I guess no one will mind
> posting this here.
> Before looking at the source code for tynamo-resteasy, how hard would it be
> to write tapestry-jersey integration module?

Not that hard :) In all seriousness, you probably *do* want to look at
the source code of Tynamo's tapestry-resteasy. There isn't that much
but I'm sure it'd be way easier to mimic that code than write it all
from scratch. I'm a fan of Jersey and used to use it heavily before -
not with Tapestry though. If you are serious about writing it, I could
very well see Tynamo hosting a tapestry-jersey module. The situation
would be similar to native hibernate and JPA modules we offer. Feel
free to put it up on google code or github or just keep the
implementation to yourself. You know, publishing code is a
double-edged sword - it raises the bar and as soon as you share it,
the pesky users crop up from everywhere and start demanding
improvements. On the other hand, you might get a few free bug fixes ;)

Kalle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org