Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@RequestBody string is escaped

 
Gajen Logandan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the following method in my controller,



But the requestbody is getting escaped most probably at the dispatcher. How can I avoid this?
 
Parth Bhagat
Greenhorn
Posts: 7
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds that you are receiving detail of data posted from the form.

Are you using Spring's form taglib to create & manage form?

In that case @RequestBody will not get detail of your form fields. You can get form data from @ModelAttribute which you've set on form tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic