• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle Ajax response in Spring MVC

 
M Manjunath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I wanna use Ajax in Spring MVC...
Can anyone please help me out on the same
..
Thanks in advance
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a pretty open-ended question. What, exactly, do you want to do? What problems are you encountering? What are you using on the client side?
 
M Manjunath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From JSP page I am making an ajax request to the spring controller and I am trying to print something, like System.out.println("Hello from spring controller"); but am not getting this output in the ajax response object. Is there any other way to send response from spring? Please help..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...

The response still needs to be returned to the caller; s.o.p just prints to the console. The response can be built using any of the standard Spring/web mechanisms. How that response is handled is up to your calling code.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!