• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ajax request help  RSS feed

 
Stamin Adrian
Ranch Hand
Posts: 34
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are the values on the servlet always null?

This is the javascript/ JQUERY AJAX WITH JSON

This is the servlet code


Any help would be greatly appreciate. Or any suggestions. I did something similar before and it worked. It really bugs me out.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stamin Adrian wrote:Why are the values on the servlet always null?

I don't know what you mean by "value on the servlet".
 
Stamin Adrian
Ranch Hand
Posts: 34
Chrome Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sending two values to the servlet. Id and category. I select them from the view, and they are good. But the request.getAttribute() returns nulls.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps getAttribute() isn't the right method to use?


Hint: it's not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!