File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes problem in servlet with Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "problem in servlet with Ajax" Watch "problem in servlet with Ajax" New topic
Author

problem in servlet with Ajax

Ritesh raushan
Ranch Hand

Joined: Aug 29, 2012
Posts: 100
when i submit request output has not come and also not give errors.



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61753
    
  67

Please post your code again with proper indentation. Unindented code is just too hard to read. But on an initial inspection, it does not look like you are using Ajax correctly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ayan mallick
Ranch Hand

Joined: Nov 17, 2012
Posts: 46
you can check with javascript alert whether functions are being called properly.

then you can put print statement in the servlet to check whether request is coming upto servlet or not.

go step by step and check where is the problem.

I think type of http request would be "GET" not "get".
Petro Gordiievych
Greenhorn

Joined: Dec 29, 2012
Posts: 2
Try instead use Since as form will be submit after you click on button, because type is "submit" and don't go though fun1(). If it doesn't work may I suggest you to use jQuery instead pour JS Ajax, it can save lot of time and be crossbrowser solution. For example to your case:


Don't forgot add two JS library:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in servlet with Ajax