• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the completed errors
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
I am going to test your electrical conductivity with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic