You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2009/03/23 12:05:22 UTC

DWR / JQuery and Tapestry 5.1

Hi,

I am interested in using either JQuery / DWR for some reverse AJAX in a Tapestry 5.1 web application, I would like to know if:
1) DWR can be integrated with Tapestry (if so, how?)
2) Is JQuery available in 5.1? are there Tapestry docs?
3) How does Prototype fair when using reverse AJAX?

Essentially I am looking for the best approach, as I still know very little about reverse AJAX, so any pointers or tips (tutorials for reverse AJAX with Tapestry!) are not just welcome but coveted.

Thanks,
Peter

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


Re: DWR / JQuery and Tapestry 5.1

Posted by Peter Stavrinides <P....@albourne.com>.
I downloaded the latest snapshot version and deployed the jar in my local Maven repository... don't know if its working but its no longer complaining at least.

Peter

----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 23 March, 2009 16:54:28 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: DWR / JQuery and Tapestry 5.1

On Mon, Mar 23, 2009 at 11:48 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> No it wouldn't be, but Tapestry is a filter, and this is a Servlet, so the question is can they work side by side?

All you need to do is to tell Tapestry to not handle the DWR servlet
URLs, something you have already done by onw.

> 2009-03-23 16:42:43.484::WARN:  Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@48fbc0{/castle,/home/pstavrin/workspace/Java/Tapestry5/castle/src/main/webapp}
> java.lang.ClassNotFoundException: org.directwebremoting.servlet.DwrServlet

Are you sure you added the DWR jar/jars to the classpath? It seems
obvious, but the stack trace doesn't mention Tapestry, so it shoudn't
be the problem here.

-- 
Thiago

---------------------------------------------------------------------
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: DWR / JQuery and Tapestry 5.1

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, Mar 23, 2009 at 11:48 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> No it wouldn't be, but Tapestry is a filter, and this is a Servlet, so the question is can they work side by side?

All you need to do is to tell Tapestry to not handle the DWR servlet
URLs, something you have already done by onw.

> 2009-03-23 16:42:43.484::WARN:  Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@48fbc0{/castle,/home/pstavrin/workspace/Java/Tapestry5/castle/src/main/webapp}
> java.lang.ClassNotFoundException: org.directwebremoting.servlet.DwrServlet

Are you sure you added the DWR jar/jars to the classpath? It seems
obvious, but the stack trace doesn't mention Tapestry, so it shoudn't
be the problem here.

-- 
Thiago

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


Re: DWR / JQuery and Tapestry 5.1

Posted by Peter Stavrinides <P....@albourne.com>.
>I can't see how Tapestry would cause a class not found exception, so I
>guess this is not a Tapestry issue. Could you post the stack trace
>here?
No it wouldn't be, but Tapestry is a filter, and this is a Servlet, so the question is can they work side by side?

Stack Trace:

2009-03-23 16:42:43.484::WARN:  Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@48fbc0{/castle,/home/pstavrin/workspace/Java/Tapestry5/castle/src/main/webapp}
java.lang.ClassNotFoundException: org.directwebremoting.servlet.DwrServlet
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
	at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
	at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
	at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:73)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
	at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1100)
	at org.mortbay.jetty.plugin.Jetty6MavenConfiguration.parseAnnotations(Jetty6MavenConfiguration.java:135)
	at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:119)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
	at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96)
	at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1236)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
	at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:222)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
	at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
	at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
	at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:205)
	at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
2009-03-23 16:42:43.512::INFO:  Started SelectChannelConnector@0.0.0.0:8080
[INFO] Started Jetty Server


----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 23 March, 2009 16:40:18 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: DWR / JQuery and Tapestry 5.1

On Mon, Mar 23, 2009 at 11:36 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> and have set the ignored paths but still get a class not found exception, does anybody know how to get DWR and Tapestry to play nice?

I can't see how Tapestry would cause a class not found exception, so I
guess this is not a Tapestry issue. Could you post the stack trace
here?

-- 
Thiago

---------------------------------------------------------------------
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: DWR / JQuery and Tapestry 5.1

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, Mar 23, 2009 at 11:36 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> and have set the ignored paths but still get a class not found exception, does anybody know how to get DWR and Tapestry to play nice?

I can't see how Tapestry would cause a class not found exception, so I
guess this is not a Tapestry issue. Could you post the stack trace
here?

-- 
Thiago

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


Re: DWR / JQuery and Tapestry 5.1

Posted by Peter Stavrinides <P....@albourne.com>.
>See http://tapestry.apache.org/tapestry5/guide/conf.html, section
>"Ignored paths".
Thanks Thiago, but I think its going to take a little more than that to get it to work, I have tried the instructions here:
http://directwebremoting.org/dwr/reverse-ajax/getting-started
and have set the ignored paths but still get a class not found exception, does anybody know how to get DWR and Tapestry to play nice?

Peter


-- 
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.

----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 23 March, 2009 14:10:40 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: DWR / JQuery and Tapestry 5.1

On Mon, Mar 23, 2009 at 8:05 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> I am interested in using either JQuery / DWR for some reverse AJAX in a Tapestry 5.1 web application, I would like to know if:
> 1) DWR can be integrated with Tapestry (if so, how?)



> 2) Is JQuery available in 5.1? are there Tapestry docs?

Tapestry's JavaScript code is written in Prototype, but that doesn't
prevent you from using any other JS framework.

> 3) How does Prototype fair when using reverse AJAX?

I don't know.

-- 
Thiago

---------------------------------------------------------------------
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: DWR / JQuery and Tapestry 5.1

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, Mar 23, 2009 at 8:05 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> I am interested in using either JQuery / DWR for some reverse AJAX in a Tapestry 5.1 web application, I would like to know if:
> 1) DWR can be integrated with Tapestry (if so, how?)

See http://tapestry.apache.org/tapestry5/guide/conf.html, section
"Ignored paths".

> 2) Is JQuery available in 5.1? are there Tapestry docs?

Tapestry's JavaScript code is written in Prototype, but that doesn't
prevent you from using any other JS framework.

> 3) How does Prototype fair when using reverse AJAX?

I don't know.

-- 
Thiago

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