• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem in getting ajax response from servlet

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is very simple example .... I'm trying to get some response from servlet using ajax request call... but things are going unchanged.....

please identify the problem and guide me....

my HTML file


And Servlet code...


Problem is value in div is not changing...
 
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the URL mapping of the servlet "VerifySrv" in web.xml ?
 
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try showing whatever comes from server first, you can have if checks and highlighting later. That will give you confidence that things are working.
 
Greenhorn
Posts: 19
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your servlet code use "print" instead of "println" for output ..because the responsetext coming from servlet is with the newline character appended'\n'..so when you performing the match its not working..
otherwise inspect firebug console post and header tab for the exact problem..
 
This one time, at bandcamp, I had relations with a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic