<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: DWR Annotations &#38; Spring</title>
	<atom:link href="http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/</link>
	<description>Startup IT and Software Development</description>
	<pubDate>Mon, 06 Oct 2008 12:30:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: gtuhl</title>
		<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/#comment-12</link>
		<dc:creator>gtuhl</dc:creator>
		<pubDate>Sat, 14 Apr 2007 13:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=10#comment-12</guid>
		<description>Hey Peter,

Really appreciate the comment.  Wordpress is a bear with respect to getting code into posts.  I am still using the generic hosted wordpress and as far as I can tell am not allowed to install the plugins that make it easier.

I've been using some Javascript converter that wraps the stuff in a code tag and then converts symbols to their html entity equivalents.  It is less than ideal.  I need to just setup a box a home and host wordpress myself.

With that said, I apologize for not mentioning the @DataTransferObject in my post.  That is a pretty important part of getting it to work.  On our particular project after a handful of custom converters and enum converters in dwr.xml we had a lazy (and potentially dangerous) line that looked like this:

&lt;code&gt;&#60;convert converter="bean" match="com.ourproject.*"/&#62;&lt;/code&gt;

We had probably 100 different classes that would have needed @DataTransferObject annotations and I just wasn't up to the task.  So we are running DWR in a bit of a hybrid mode - the exposed controllers are configured through annotations and the objects we send over the wire are configured in dwr.xml through that messy wildcard converter line.

Thanks again for the comment,

Joe</description>
		<content:encoded><![CDATA[<p>Hey Peter,</p>
<p>Really appreciate the comment.  Wordpress is a bear with respect to getting code into posts.  I am still using the generic hosted wordpress and as far as I can tell am not allowed to install the plugins that make it easier.</p>
<p>I&#8217;ve been using some Javascript converter that wraps the stuff in a code tag and then converts symbols to their html entity equivalents.  It is less than ideal.  I need to just setup a box a home and host wordpress myself.</p>
<p>With that said, I apologize for not mentioning the @DataTransferObject in my post.  That is a pretty important part of getting it to work.  On our particular project after a handful of custom converters and enum converters in dwr.xml we had a lazy (and potentially dangerous) line that looked like this:</p>
<p><code>&lt;convert converter="bean" match="com.ourproject.*"/&gt;</code></p>
<p>We had probably 100 different classes that would have needed @DataTransferObject annotations and I just wasn&#8217;t up to the task.  So we are running DWR in a bit of a hybrid mode - the exposed controllers are configured through annotations and the objects we send over the wire are configured in dwr.xml through that messy wildcard converter line.</p>
<p>Thanks again for the comment,</p>
<p>Joe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Odéus</title>
		<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/#comment-11</link>
		<dc:creator>Peter Odéus</dc:creator>
		<pubDate>Sat, 14 Apr 2007 10:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=10#comment-11</guid>
		<description>Hmm, I haven't posted a blog comment before. Ok, let's try one more time without using code tags:

It took a while to get things working, though. Here are some issues that wasn’t obvious at first. Here is my story:

1. web.xml, as pertaining to dwr, now looks like this:

         
		dwr
		
			org.springframework.web.servlet.DispatcherServlet
		
		2
	
	
	
		dwr
		/dwr/*
	

2. When having a @RemoteMethod that takes class instance Foo and returns Foo, not only should class Foo be annotated with @DataTransferObject (import org.directwebremoting.annotations.DataTransferObject;). Foo must also be appended to the “classes” property (see DwrServlet’s initParameters above). So basically, ALL classes having dwr annotations MUST be in the “classes” parameter.

3. To enable debug pages to be reachable from http://whatever.com/dwr, another property must be appended to DwrServlet’s initParameters:
true</description>
		<content:encoded><![CDATA[<p>Hmm, I haven&#8217;t posted a blog comment before. Ok, let&#8217;s try one more time without using code tags:</p>
<p>It took a while to get things working, though. Here are some issues that wasn’t obvious at first. Here is my story:</p>
<p>1. web.xml, as pertaining to dwr, now looks like this:</p>
<p>		dwr</p>
<p>			org.springframework.web.servlet.DispatcherServlet</p>
<p>		2</p>
<p>		dwr<br />
		/dwr/*</p>
<p>2. When having a @RemoteMethod that takes class instance Foo and returns Foo, not only should class Foo be annotated with @DataTransferObject (import org.directwebremoting.annotations.DataTransferObject;). Foo must also be appended to the “classes” property (see DwrServlet’s initParameters above). So basically, ALL classes having dwr annotations MUST be in the “classes” parameter.</p>
<p>3. To enable debug pages to be reachable from <a href="http://whatever.com/dwr" rel="nofollow">http://whatever.com/dwr</a>, another property must be appended to DwrServlet’s initParameters:<br />
true</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Odéus</title>
		<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/#comment-10</link>
		<dc:creator>Peter Odéus</dc:creator>
		<pubDate>Sat, 14 Apr 2007 10:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=10#comment-10</guid>
		<description>Nice post.

It took a while to get things working, though. Here are some issues that wasn't obvious at first. Here is my story:

1. web.xml, as pertaining to dwr, now looks like this:

&lt;code&gt;
        
		dwr
		
			org.springframework.web.servlet.DispatcherServlet
		
		2
	
	
	
		dwr
		/dwr/*
	
&lt;/code&gt;
 

2. When having a @RemoteMethod that takes class instance Foo and returns Foo, not only should class Foo be annotated with @DataTransferObject (import org.directwebremoting.annotations.DataTransferObject;). Foo must also be appended to the "classes" property (see DwrServlet's initParameters above). So basically, ALL classes having dwr annotations MUST be in the "classes" parameter.

3. To enable debug pages to be reachable from http://whatever.com/dwr, another property must be appended to DwrServlet's initParameters:

&lt;code&gt;
true
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Nice post.</p>
<p>It took a while to get things working, though. Here are some issues that wasn&#8217;t obvious at first. Here is my story:</p>
<p>1. web.xml, as pertaining to dwr, now looks like this:</p>
<p><code></p>
<p>		dwr</p>
<p>			org.springframework.web.servlet.DispatcherServlet</p>
<p>		2</p>
<p>		dwr<br />
		/dwr/*</p>
<p></code></p>
<p>2. When having a @RemoteMethod that takes class instance Foo and returns Foo, not only should class Foo be annotated with @DataTransferObject (import org.directwebremoting.annotations.DataTransferObject;). Foo must also be appended to the &#8220;classes&#8221; property (see DwrServlet&#8217;s initParameters above). So basically, ALL classes having dwr annotations MUST be in the &#8220;classes&#8221; parameter.</p>
<p>3. To enable debug pages to be reachable from <a href="http://whatever.com/dwr" rel="nofollow">http://whatever.com/dwr</a>, another property must be appended to DwrServlet&#8217;s initParameters:</p>
<p><code><br />
true<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gtuhl</title>
		<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/#comment-9</link>
		<dc:creator>gtuhl</dc:creator>
		<pubDate>Tue, 27 Mar 2007 19:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=10#comment-9</guid>
		<description>We're using spring to initialize DWR.  I apologize for the omission.  Without clarifying that my post isn't very helpful to someone getting setup for the first time.

It looks roughly like this is our application, I will try to make a legitimate post in the future with more details.  We started out with version 1.0 of DWR and I believe there may be easier ways to do this initialization now and this excludes some custom properties and subclasses we use and thus may not work without tweaking:

&lt;code&gt;
&#60;bean id="dwrController" class="org.springframework.web.servlet.mvc.ServletWrappingController"&#62;
&#160;&#160;&#160;&#160;&#60;property name="servletClass" value="org.directwebremoting.servlet.DwrServlet"/&#62;
&#160;&#160;&#160;&#160;&#60;property name="initParameters"&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;props&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;prop key="classes"&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;com.sample.Class1,
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;com.sample.Class2,
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;...
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;/prop&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;/props&#62;
&#160;&#160;&#160;&#160;&#60;/property&#62;
&#60;/bean&#62;
&lt;/code&gt;

The comma-delimited classes parameter is where you list classes annotated for DWR configuration.  If you are using dwr.xml for configuration this won't be necessary.

Bram Smeets has many very helpful posts about Spring and DWR.  &lt;a href="http://bram.jteam.nl/index.php/category/java/spring/" rel="nofollow"&gt;Here is his blog.&lt;/a&gt;  The DWR mailing is also very responsive and helpful - I'd give that a shot if you get stuck.</description>
		<content:encoded><![CDATA[<p>We&#8217;re using spring to initialize DWR.  I apologize for the omission.  Without clarifying that my post isn&#8217;t very helpful to someone getting setup for the first time.</p>
<p>It looks roughly like this is our application, I will try to make a legitimate post in the future with more details.  We started out with version 1.0 of DWR and I believe there may be easier ways to do this initialization now and this excludes some custom properties and subclasses we use and thus may not work without tweaking:</p>
<p><code><br />
&lt;bean id="dwrController" class="org.springframework.web.servlet.mvc.ServletWrappingController"&gt;<br />
&#160;&#160;&#160;&#160;&lt;property name="servletClass" value="org.directwebremoting.servlet.DwrServlet"/&gt;<br />
&#160;&#160;&#160;&#160;&lt;property name="initParameters"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;props&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;prop key="classes"&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;com.sample.Class1,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;com.sample.Class2,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;...<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/prop&gt;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/props&gt;<br />
&#160;&#160;&#160;&#160;&lt;/property&gt;<br />
&lt;/bean&gt;<br />
</code></p>
<p>The comma-delimited classes parameter is where you list classes annotated for DWR configuration.  If you are using dwr.xml for configuration this won&#8217;t be necessary.</p>
<p>Bram Smeets has many very helpful posts about Spring and DWR.  <a href="http://bram.jteam.nl/index.php/category/java/spring/" rel="nofollow">Here is his blog.</a>  The DWR mailing is also very responsive and helpful - I&#8217;d give that a shot if you get stuck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ojs</title>
		<link>http://blog.gtuhl.com/2007/03/15/dwr-annotations-spring/#comment-8</link>
		<dc:creator>ojs</dc:creator>
		<pubDate>Tue, 27 Mar 2007 18:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://gtuhl.nfshost.com/blog/?p=10#comment-8</guid>
		<description>Thanks for this article! How do you initialize DWR - via web.xml or via spring? I'd like to initialize it via spring, because my AjaxController needs a backend service injected.</description>
		<content:encoded><![CDATA[<p>Thanks for this article! How do you initialize DWR - via web.xml or via spring? I&#8217;d like to initialize it via spring, because my AjaxController needs a backend service injected.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
