This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[ajax and servlet] Servlet could not retrieve parameters from ajax xmlHttp.send(params)

 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi eveyone,

I was trying to send parameters through xmlHttp.send(params) and process them in my servlet class.
However, I could not retrieve those parameters in the servlet class by using request.getParameter("paramName");

here is my code in javascripts(ajax part)


and here is the code in my servlet class



now I am able to get and display "hahaha" in my webpage ,but all the parameters returned are all nulls.


any comments will be grateful.

thanks very much in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64969
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Firebug in Firefox to inspect the request that you are sending. Is it correct?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic