File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Pushing data down to the user? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Pushing data down to the user?" Watch "Pushing data down to the user?" New topic

Pushing data down to the user?

Lat Triv

Joined: Apr 28, 2005
Posts: 2
I'm relatively new to Java (my background has been in mainly C/C++ apps) so forgive me if there is a simple answer to this question or if it is impossible to do this.

I have been tasked with writing a small server that connects to some a couple of other small legacy servers using Java RMI. That seems simple enough.

Our manager insists that the front-end to this server should be web-based. That by itself seems simple enough, implement it as a Servlet or JSP. The issue is that this server will be continually running with information being updated with certain tasks starting, stopping, erroring, etc.

From my understanding JSPs/Servlets dynamically create pages per a user (or other servlet's) request. In my case I would need to be able to PUSH the updated information to the user�s browser (yea, I know�that�s the best way I have of describing what my boss wants). Having the page automatically update every X seconds is an option, but doesn�t seem very elegant.

Does it make more sense for me to insert an Applet into the web page that the server could communicated to directly, or is there some sort of PUSH technology for JSPs/Servlets?

I guess the gist of it is they want it to act like a desktop application even though it is a web app.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Those are pretty much your options.
A polling page that checks and PULLs the data if it's updated or
An applet capable of maintaing a socket connection.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Lat Triv

Joined: Apr 28, 2005
Posts: 2
Thanks! That is what I was thinking. My management doesn't quite seem to understand the technology
I agree. Here's the link:
subject: Pushing data down to the user?
It's not a secret anymore!