This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet & Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet & Swing" Watch "Servlet & Swing" New topic
Author

Servlet & Swing

Tod Sterben
Greenhorn

Joined: May 05, 2003
Posts: 7
I have a Swing app that I need to convert into a servlet (I think & I hope). I don't want to have to convert all of this to HTML.
It has Scroll panes, JPanel, JComboBoxes & JLists.
Also SQL.
Is it possible to have this work?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21

Nope.
Swing requires asynchronous communications between the UI components. Servlets are only permitted what HTTP permits, which is synchronous request-response type communications initiated from the client side only.
That's why it's not accurate to refer to server-based UI paradigms as "MVC". And why the Model 2 scheme had to be developed to work around those limitations.
OTOH, if you can convert your app into an applet, the server can send it embedded in a web page to the client computer and the two systems can converse. Subject to all the usual grief that applets subject you to.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
GeeCON Prague 2014
 
subject: Servlet & Swing