File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Ajax doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax doubt" Watch "Ajax doubt" New topic

Ajax doubt

Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

hello all,

I am developing a web application using java/j2ee. In my web application the server should be able to send any new information to client(browser) dynamically.
Does Ajax fit for my requirement. Is there any other better approach?
On a jsp page after sending Ajax request to server if I go to another jsp page by clicking another link what happens to the previous Ajax response. Will i get updated information if i go to previous jsp page.


SCJP 5.0, SCWCD 5, preparing for SCDJWS
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63540

No. HTTP is a stateless protocol. How could the server push data out to a browser that it doesn't know exists? How would it know what page the user is looking at if it did know the browser existed?

There are technologies that will hold open a long connection, but that still has limitations beyond what you are asking for.

The client must contact the server, not the other way around.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Ajax doubt
It's not a secret anymore!