wood burning stoves*
The moose likes Servlets and the fly likes [ajax and servlet] Servlet could not retrieve parameters from ajax xmlHttp.send(params) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "[ajax and servlet] Servlet could not retrieve parameters from ajax xmlHttp.send(params)" Watch "[ajax and servlet] Servlet could not retrieve parameters from ajax xmlHttp.send(params)" New topic
Author

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

wei liu
Ranch Hand

Joined: Nov 19, 2008
Posts: 35

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


SCJP 1.6 in 2010
SCWCD5 in 2011
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Use Firebug in Firefox to inspect the request that you are sending. Is it correct?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [ajax and servlet] Servlet could not retrieve parameters from ajax xmlHttp.send(params)
 
Similar Threads
Progress Bar Issue in JSP
How to display value in combo box using AJAX
refresh an HTML table using AJAX and JSP
Displaying a Greeting message using Ajax
ajax-jsp special characters like %,&