Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
    Bookmark Topic Watch Topic
  • New Topic

Ajax servlet form validation problem  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have made a form validation using ajax wherein i am trying to validate email id through ajax call which would be directed to a servlet.But it seems that the servlet is not being called.
following is my jsp code



The following is my servlet code


However if when i used jsp instead of servlet(which i should not) for testing sake i was getting correc output.
 
Author and ninkuma
Marshal
Posts: 66678
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Your servlet is mapped to ""regajax4.java"? Really?

The URL should to the mapping that you gave to the servlet in the deployment descriptor, prefixed by the context path. More info is in the JspFaq.

Also, why are you not using jQuery to do your Ajax? It is not recommended to use Ajax "by hand" as you have done here.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66678
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closed as this question is repeated elsewhere.
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!