<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ajax Simplifications in Spring 3.0</title>
	<atom:link href="http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Jet Ma</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-5/#comment-234596</link>
		<dc:creator>Jet Ma</dc:creator>
		<pubDate>Fri, 30 Dec 2011 03:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-234596</guid>
		<description>This sample can&#039;t work well with spring 3.1.0.</description>
		<content:encoded><![CDATA[<p>This sample can&#039;t work well with spring 3.1.0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-234589</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 29 Dec 2011 20:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-234589</guid>
		<description>I am going to develop a web app with spring, jquery and json and find your sample code very helpful. I got the sample code running in Tomcat and also Weblogic 10.3.5 with replacing the  section with  since the problem to get js files from the resources directory.

Right now, I am trying to use Spring 3.1.0 since it fixed the js  issue. But I got 400 Bad Request Error in Weblogic when clicking on the Create button. When running in Tomcat, the FormatAnnotationIntrospector is not used to handle the format annotations.</description>
		<content:encoded><![CDATA[<p>I am going to develop a web app with spring, jquery and json and find your sample code very helpful. I got the sample code running in Tomcat and also Weblogic 10.3.5 with replacing the  section with  since the problem to get js files from the resources directory.</p>
<p>Right now, I am trying to use Spring 3.1.0 since it fixed the js  issue. But I got 400 Bad Request Error in Weblogic when clicking on the Create button. When running in Tomcat, the FormatAnnotationIntrospector is not used to handle the format annotations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eleanor</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-226705</link>
		<dc:creator>Eleanor</dc:creator>
		<pubDate>Sun, 27 Nov 2011 05:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-226705</guid>
		<description>I spent lot of time to run this example in Eclipse and Netbeans but 
1) when I tab out nothing happened.

2) when I hit creat button I only get this error :

escription The server refused this request because the request entity is in a format not supported by the requested resource for the requested method ().

Please whoever had success with this example help me .
thanks.</description>
		<content:encoded><![CDATA[<p>I spent lot of time to run this example in Eclipse and Netbeans but<br />
1) when I tab out nothing happened.</p>
<p>2) when I hit creat button I only get this error :</p>
<p>escription The server refused this request because the request entity is in a format not supported by the requested resource for the requested method ().</p>
<p>Please whoever had success with this example help me .<br />
thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giridhar</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-221002</link>
		<dc:creator>Giridhar</dc:creator>
		<pubDate>Fri, 18 Nov 2011 14:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-221002</guid>
		<description>Hi,

 I am developing a web application in Spring Framework. In simple words my application works with

 Spring MVC RESTful JSON ajax jQuery. HOpe you understood by this.

To implement security i am struggling alot. Can u kindly Post a tutorial with sample code. That implements spring security for login validation with remember me option.

And if possible, every request must be checked.

Please help me.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p> I am developing a web application in Spring Framework. In simple words my application works with</p>
<p> Spring MVC RESTful JSON ajax jQuery. HOpe you understood by this.</p>
<p>To implement security i am struggling alot. Can u kindly Post a tutorial with sample code. That implements spring security for login validation with remember me option.</p>
<p>And if possible, every request must be checked.</p>
<p>Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-216087</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 07 Nov 2011 01:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-216087</guid>
		<description>Regarding my previous entry, I found that when I turned on Firebug in my Firefox browser, I can actually see the returnning string &quot;Your info&quot; in Firebug console. It&#039;s good news to me. At least the controller returned the string back to my browser. Firebug pointed to the line 126 of jquery-1.4.min.js (from the sample repository). Still need to figure out why jquery is not reaching my callback.

I actually prefer a synchrounous in my app. Wonder if there is a way to do that. Currently, I&#039;m using
$.getJSON(&quot;enrollment/get_info&quot;, { countryCode: &quot;GB&quot; }, function(myInfo) {
// something to do with myInfo
});

Jason</description>
		<content:encoded><![CDATA[<p>Regarding my previous entry, I found that when I turned on Firebug in my Firefox browser, I can actually see the returnning string &#034;Your info&#034; in Firebug console. It&#039;s good news to me. At least the controller returned the string back to my browser. Firebug pointed to the line 126 of jquery-1.4.min.js (from the sample repository). Still need to figure out why jquery is not reaching my callback.</p>
<p>I actually prefer a synchrounous in my app. Wonder if there is a way to do that. Currently, I&#039;m using<br />
$.getJSON(&#034;enrollment/get_info&#034;, { countryCode: &#034;GB&#034; }, function(myInfo) {<br />
// something to do with myInfo<br />
});</p>
<p>Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-216085</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 06 Nov 2011 20:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-216085</guid>
		<description>I&#039;ve followed this MVC AJAX sample in But I couldn&#039;t get my controller return visa @ResponseBody to my javascript caller. Here are what I did:

In JS:
$.getJSON(&quot;enrollment/get_info&quot;, { countryCode: &quot;GB&quot; }, function(myInfo) {
alert(&quot;myInfo = &quot;   myInfo);
});

In Controller:
@Controller
@RequestMapping(&quot;/enrollment&quot;)
public class EnrollmentController{
@RequestMapping(value=&quot;/get_info&quot;, method=RequestMethod.GET)
public @ResponseBody String getInfo(@RequestParam String countryCode) {
System.out.println(&quot;countryCode = &quot;   countryCode);
return &quot;Your info&quot;;
}
}

In servlet-context.xml:
...




...

And I do have the following jars in my WEB-INF/lib
jackson-core-asl-1.6.4.jar
jackson-mapper-asl-1.6.4.jar

I&#039;m using springframework 3.0.6

I can see the following in my tomcat log:
countryCode = GB
2011-11-06 10:24:47,601 DEBUG [DispatcherServlet] DispatcherServlet with name &#039;springAppServlet&#039; processing GET request for [/myapp/spring/enrollment/get_info]
2011-11-06 10:24:47,601 DEBUG [DefaultAnnotationHandlerMapping] Mapping [/enrollment/get_info] to HandlerExecutionChain with handler [com.mycom.myapp.spring.controller.EnrollmentContro ller@1484a8a] and 2 interceptors
2011-11-06 10:24:47,601 DEBUG [DispatcherServlet] Last-Modified value for [/myapp/spring/enrollment/get_info] is: -1
2011-11-06 10:24:47,603 DEBUG [HandlerMethodInvoker] Invoking request handler method: public java.lang.String com.mycom.myapp.spring.controller.EnrollmentContro ller.getInfo(java.lang.String)
2011-11-06 10:24:47,606 DEBUG [AnnotationMethodHandlerAdapter] Written [Your info] as &quot;application/json&quot; using [org.springframework.http.converter.StringHttpMessa geConverter@d8326d]
2011-11-06 10:24:47,606 DEBUG [DispatcherServlet] Null ModelAndView returned to DispatcherServlet with name &#039;springAppServlet&#039;: assuming HandlerAdapter completed request handling
2011-11-06 10:24:47,607 DEBUG [DispatcherServlet] Successfully completed request

I can see that the controller was prossing the request, but just couldn&#039;t return back to the javascript caller since its alert() never shown.

The other interesting thing is that sometime the request couldn&#039;t even reseach the controller without changing any of code/configuration.

What&#039;s wrong? Do I need the java classes in org.springframework.samples.mvc.ajax.json from this sample for my controller? Currently I&#039;m not using them for my controller.

Appreciate your help!
Jason</description>
		<content:encoded><![CDATA[<p>I&#039;ve followed this MVC AJAX sample in But I couldn&#039;t get my controller return visa @ResponseBody to my javascript caller. Here are what I did:</p>
<p>In JS:<br />
$.getJSON(&#034;enrollment/get_info&#034;, { countryCode: &#034;GB&#034; }, function(myInfo) {<br />
alert(&#034;myInfo = &#034;   myInfo);<br />
});</p>
<p>In Controller:<br />
@Controller<br />
@RequestMapping(&#034;/enrollment&#034;)<br />
public class EnrollmentController{<br />
@RequestMapping(value=&#034;/get_info&#034;, method=RequestMethod.GET)<br />
public @ResponseBody String getInfo(@RequestParam String countryCode) {<br />
System.out.println(&#034;countryCode = &#034;   countryCode);<br />
return &#034;Your info&#034;;<br />
}<br />
}</p>
<p>In servlet-context.xml:<br />
&#8230;</p>
<p>&#8230;</p>
<p>And I do have the following jars in my WEB-INF/lib<br />
jackson-core-asl-1.6.4.jar<br />
jackson-mapper-asl-1.6.4.jar</p>
<p>I&#039;m using springframework 3.0.6</p>
<p>I can see the following in my tomcat log:<br />
countryCode = GB<br />
2011-11-06 10:24:47,601 DEBUG [DispatcherServlet] DispatcherServlet with name &#039;springAppServlet&#039; processing GET request for [/myapp/spring/enrollment/get_info]<br />
2011-11-06 10:24:47,601 DEBUG [DefaultAnnotationHandlerMapping] Mapping [/enrollment/get_info] to HandlerExecutionChain with handler [com.mycom.myapp.spring.controller.EnrollmentContro ller@1484a8a] and 2 interceptors<br />
2011-11-06 10:24:47,601 DEBUG [DispatcherServlet] Last-Modified value for [/myapp/spring/enrollment/get_info] is: -1<br />
2011-11-06 10:24:47,603 DEBUG [HandlerMethodInvoker] Invoking request handler method: public java.lang.String com.mycom.myapp.spring.controller.EnrollmentContro ller.getInfo(java.lang.String)<br />
2011-11-06 10:24:47,606 DEBUG [AnnotationMethodHandlerAdapter] Written [Your info] as &#034;application/json&#034; using [org.springframework.http.converter.StringHttpMessa geConverter@d8326d]<br />
2011-11-06 10:24:47,606 DEBUG [DispatcherServlet] Null ModelAndView returned to DispatcherServlet with name &#039;springAppServlet&#039;: assuming HandlerAdapter completed request handling<br />
2011-11-06 10:24:47,607 DEBUG [DispatcherServlet] Successfully completed request</p>
<p>I can see that the controller was prossing the request, but just couldn&#039;t return back to the javascript caller since its alert() never shown.</p>
<p>The other interesting thing is that sometime the request couldn&#039;t even reseach the controller without changing any of code/configuration.</p>
<p>What&#039;s wrong? Do I need the java classes in org.springframework.samples.mvc.ajax.json from this sample for my controller? Currently I&#039;m not using them for my controller.</p>
<p>Appreciate your help!<br />
Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-211156</link>
		<dc:creator>Cyril</dc:creator>
		<pubDate>Wed, 26 Oct 2011 20:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-211156</guid>
		<description>Hey Lace,

open the browser debugger and check what it shows you. Also, when you said &quot;Nothing submitted to server&quot; you already check the DEBUG messages and you are sure that &quot;Nothing submitted to server&quot;, don&#039;t you?</description>
		<content:encoded><![CDATA[<p>Hey Lace,</p>
<p>open the browser debugger and check what it shows you. Also, when you said &#034;Nothing submitted to server&#034; you already check the DEBUG messages and you are sure that &#034;Nothing submitted to server&#034;, don&#039;t you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lace</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-211154</link>
		<dc:creator>lace</dc:creator>
		<pubDate>Wed, 26 Oct 2011 20:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-211154</guid>
		<description>please ignore my question

After using sts, everything runs fine</description>
		<content:encoded><![CDATA[<p>please ignore my question</p>
<p>After using sts, everything runs fine</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lace</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-211137</link>
		<dc:creator>lace</dc:creator>
		<pubDate>Wed, 26 Oct 2011 20:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-211137</guid>
		<description>Hi,

I just tried this but when click Create button, nothing happened. Nothing submitted to server.

Anyone can help?

many thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I just tried this but when click Create button, nothing happened. Nothing submitted to server.</p>
<p>Anyone can help?</p>
<p>many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/comment-page-4/#comment-208124</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Fri, 21 Oct 2011 09:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3980#comment-208124</guid>
		<description>Regarding the spring-&gt;jackson deserialization chain, you mention:

Spring detects and invokes the JacksonConversionServiceConfigurer @Component when the application starts up. This BeanPostProcessor intercepts the initialization event for Spring MVC&#039;s AnnotationMethodHandlerAdapter, retrieves the default MappingJacksonHttpMessageConverter, and injects a custom Jackson ObjectMapper that uses our ConversionService.

Given that, how can one obtain a reference to the ObjectMapper to define additional customizations?

Specifically, I&#039;m looking for a way to define what java class type is passed in to the deserializer. I want to define whether the controller attempts to parse a base or derived class. 

I don&#039;t want to use polymorphism as I know at runtime which class a controller should expect. I&#039;m sharing controller code between 2 apps that use different variations of the data types.

Is this possible? - to set the class type here:
            @Valid @RequestBody ObjectType obj) {
to ObjectType or a subclass thereof via wiring or other startup config?</description>
		<content:encoded><![CDATA[<p>Regarding the spring-&gt;jackson deserialization chain, you mention:</p>
<p>Spring detects and invokes the JacksonConversionServiceConfigurer @Component when the application starts up. This BeanPostProcessor intercepts the initialization event for Spring MVC&#039;s AnnotationMethodHandlerAdapter, retrieves the default MappingJacksonHttpMessageConverter, and injects a custom Jackson ObjectMapper that uses our ConversionService.</p>
<p>Given that, how can one obtain a reference to the ObjectMapper to define additional customizations?</p>
<p>Specifically, I&#039;m looking for a way to define what java class type is passed in to the deserializer. I want to define whether the controller attempts to parse a base or derived class. </p>
<p>I don&#039;t want to use polymorphism as I know at runtime which class a controller should expect. I&#039;m sharing controller code between 2 apps that use different variations of the data types.</p>
<p>Is this possible? &#8211; to set the class type here:<br />
            @Valid @RequestBody ObjectType obj) {<br />
to ObjectType or a subclass thereof via wiring or other startup config?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

