Two Laptop Bag*
The moose likes Servlets and the fly likes Difference between refreshing a page in ajax and servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Difference between refreshing a page in ajax and servlet" Watch "Difference between refreshing a page in ajax and servlet" New topic
Author

Difference between refreshing a page in ajax and servlet

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
Hi Friends, we can refresh a page with servlet and ajax. what is the difference between this. why ajax is best
Srikkanth Mohanasundaram
Ranch Hand

Joined: Feb 07, 2007
Posts: 185
This is a choice which you need to make based on your requirement.

For instance ,say you have section in a page which needs to be updated regularly or something which the user doesn't need to proceed further, you can go for AJAX (which sends a request to the server and fetches XML or HTML fragment etc., ) . So here we avoid a page refresh scenario, and the user doesn't have to wait until the server is done.
There are a lot of tutorials available which will help you understand better.

Thanks,
Srikkanth
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

You don't refresh a page with Ajax -- that's the whole point of Ajax.

And, one is never always "better" than the other. It depends upon the task at hand.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Difference between refreshing a page in ajax and servlet