You're right, it works in tomcat too...
The code is now in tacos (with minor changes) + there's a demo page in tacos-demo, so one
can easily do
mvn tomcat:run-war to see it working :)

Craig Spry wrote:
Andy,

Although I haven't tested this yet I think this will work in other
servlet containers, because all the jar files from the Jetty will be
packaged up in the war file.  This is only a suspicion and I don't know
what other problems this would have.

Long term I'd like to write a tapestry service to do the cometd
functionality, so it would be independent of servlet container, but I
don't even know if this is feasible yet.  I imagine this service would
be an abstraction layer on top of what each container would offer as its
cometd implementation.

Craig

-----Original Message-----
From: Craig Spry [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 June 2007 9:08 AM
To: Tapestry users
Subject: RE: Cometd Implimentation

Thanks for your help, I'm actually trying to get it into Tacos at the
moment, when I told Andy what I had and that I wanted to put it into
Tacos, he made me a directory structure to put it in.  It should be in
its new home by the end of today.

Craig

-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 June 2007 12:18 AM
To: Tapestry users
Subject: Re: Cometd Implimentation

Looks awesome so far Craig ! Keep up the good work.  :)

Sorry I've been a little busy to keep up with everything but your
efforts
are appreciated of course.

If you wanted a public svn repo I can give you access to the tacos repo
if
you send me your sourceforge username off-list . (assuming that Andy is
ok
with that) I think the documentation and actual site for tacos is out of
date but you should have free reign to do most of those things there if
you
want.

On 6/5/07, Craig Spry <[EMAIL PROTECTED]> wrote:
I've allowed the addition of coments, so you can let me know what you
think there.

Craig

-----Original Message-----
From: Craig Spry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 6 June 2007 9:15 AM
To: Tapestry users
Subject: RE: Cometd Implimentation

Thanks for your feedback, I'll try and add the ability to add comments
to my site.  I would also like to contribute this to somewhere where
it
can be worked on by more than just me and isn't so hidden away.  Can
anyone tell me where the best place to put this would be?

Thanks,

Craig

-----Original Message-----
From: Alejandro Scandroli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 5 June 2007 5:59 PM
To: Tapestry users
Subject: Re: Cometd Implimentation

Hi Craig

Nice component!.
I've tested it with 6.1.0 version of maven-jetty-plugin and It works
fine!
I'm testing it on linux and at first Tapestry complained about not
been able to find a template for the Cometd component, it was because
the html template name is lowercase. Once I changed that it worked.

Is there a way to let you comments directly on the site?

Saludos.
Alejandro.

On 6/5/07, Craig Spry <[EMAIL PROTECTED]> wrote:
Hello,

I've managed to get a very rough implementation of cometd working
with
tapestry/jetty/dojo.  I've implemented it as a component, you can
get
the source from here:
http://www.spry.net.au/?q=node/10

To get the full effect open up 2 browsers and point them at the
webapp.
I'm putting this up for people to have a look at and it is by no way
production ready, so please don't expect it to scale, work reliably
or
even work at all.

I have only run this using, using Sun's JDK 1.5.0_11 and Maven:
mvn jetty:run

So I don't know if it will work using other JSP containers or JDKs.

Now for the nitty gritty, from here on in I assume you know
something
about cometd.  To get this to work I have a function that is
listening,
when data needs to be pushed to the page, I get the sever to publish
an
event, on the client side the data is ignored and the function that
is
listening calls the onclick() function of a component on the page,
which
does what ever you want.

I tried to send through rendered content to the listening function,
but
I couldn't work out how to get tapestry to genterate a response
without
a request.

To use this component in the .html file you will need a line that
looks
like this:
<span jwcid ="cometd" />

In the .page file:
<component id="cometd" type="Cometd">
                <binding name="webapp" value="literal:cometchat"/>
        <binding name="topic" value="literal:/pages/test"/>
        <binding name="clickComponent" value="literal:clickMe"/>
    </component>

Where webapp is the containing web application, the topic is what
the
server will be publishing on and the pages will be listening and
click
component is the id of the component that will be called by the
listening function, ie when a cometd event happens on topic
'/pages/test' clickMe.onclick() will be called on your web page.

I wouldn't recommend using what I have done to learn about cometd,
to
do
this get the jetty source code from subversion and look at the
cometd-demo in the contrib directory.

Well there it is, take it for what it is and I'll keep posting
improvements to the above site as I make them I think there is
plenty
of
room for improvements.

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to