File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Starting a GUI from a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Starting a GUI from a web application" Watch "Starting a GUI from a web application" New topic

Starting a GUI from a web application

Alfred Thomas

Joined: Apr 05, 2006
Posts: 9
Hi All - I have the following problem that I hope someone can help me with. I have written a web aplication that is used to update the state of objects. These objects are graphical objects and are displayed in a GUI java application. Whenever the state is changed from the web application, the GUI should update and reflect the changes.
I have tried to start the GUI when the servlet initializes, but then it is not visible although the log file shows that it did start.
Can anyone please point me in the right direction?

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Hi, welcome to the ranch!

Sounds like you're not entirely clear on where all the code runs. Servlets run on the server, so if you start a GUI program from a servlet it will run on the server. Users on PCs using the web app won't be able to see that. I'm not sure how you define "start" when you run the GUI program, but I think somebody logged on the server won't see the GUI either.

Who do you want to show the GUI to? If the answer is the end user your best choices is probably to write the GUI in an applet. That is Java code that displays its GUI inside the user's browser. Another option might be to generate an image (JPG or GIF file) that you could show in the browser like any other image.

Would those things solve the right problem?
[ April 05, 2006: Message edited by: Stan James ]

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
Alfred Thomas

Joined: Apr 05, 2006
Posts: 9
Hi Stan - Yes the GUI IS supposed to display on the server. Other applications will update the state of the Objects being displayed, but the actual GUI should display on the server and not in a client browser. Im trying JMS now, but having difficulty with that too

Thanks for your response
I agree. Here's the link:
subject: Starting a GUI from a web application
jQuery in Action, 3rd edition