Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet & Swing

 
Tod Sterben
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic