Hi. I have to write a servlet which must be integrated in a frame of an html page. This servlet call methods of another class that may call some events. I want to catch these event in the servlet because the html page must automatically change depending on the state. How can i do this? I try to resolv my problem setting the events in a variable of the class and reading that in the servlet. So I can change the page controlling this value and refreshing the html page periodically. but, is there another method to do that without refreshing?
On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.
Enjoy your time here.
Ping & DNS - updated with new look and Ping home screen widget
I think we need to be more precise about what happens on the server and what happens in the browser.
Most likely events are taking place on the server. If you'd like those to immediately show up on the browser you have to go outside normal HTTP protocols. This gets advanced in a hurry. My work system has an applet with an open ServerSocket so we can call out to it, but it's got problems to say the least.
If that sounds interesting we can dig into details. This architecture is called "AJAX" these days, but I'm afraid if you start Googling for AJAX you'll find a lot of confusing stuff that's way beyond your current problem.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi