Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Spring Boot with Ajax using jquery doesn't seem to be working

Ranch Hand
Posts: 49
Eclipse IDE MySQL Database Fedora
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a simple signup form where I am using Ajax call to implement this functionality.
I am using jquery for the ajax call.
I am trying to fetch the data from form using ajax and insert that form data in database and if the email entered by the user is distinct or unique then the data is inserted otherwise result failed is shown.
This code here doesn't seem to work. The ajax call is completing successfully, but I am getting error saying all the fields that I have in the model User are empty which is also the reason why this data is not being inserted in the database.

Here is the model class :-

I have removed the validation annotations from it thinking that those constraints were somehow responsible for this behaviour

Here is my controller class :-

This is my html form that I am working with :-

Please don't mind the alignments. Here is the js file which is executing the ajax call

If you can please help me with this.
Thanks in advance
Ranch Hand
Posts: 570
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the completed errors
Posts: 21971
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try this in Chrome, open its DevTools (F12) and check what the actual request to the server is?
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic