• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

use ajax with spring 3

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to use ajax with spring 3 but i can't find a correct tuto so i post here some questions.
here is my function js


here is my controller where i want to get my object Menu:

How can i get my param id from my js function getDetails?
i receive an alert error from my function getDetails: Error occured
How can i get my object in my function js to display the result? for example :
document.getElementById('txtDesc').value = object.getDesc()

thanks for your help
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added this 2 jar:
jackson-core-asl-1.9.9.jar
jackson-mapper-asl-1.9.9.jar

modify my spring-context.xml:

i modify the servlet to return my object:


and finally my js function that return the alert error!


the error say: La ressource demandée (/starterSpring/WEB-INF/jsp/admin/getDetails.jsp) n'est pas disponible.
it's correct but how can i tell it thats the same page : admin/gestionMenu.jsp
thansk for your help
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it works i forgot : @ResponseBody
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic