Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you load Java Swing Gui code through a JSP page?  RSS feed

 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just learning JSP and I have a question that keeps bugging me.

If I have some java code that uses swing to populate a desktop app with JLists and JTextboxes...can I call that code through a JSP/servlet? If I call it will it load the listboxes/textboxes in the browser, or will i have to use HTML to create the components?

If I place the JavaApp.java(is a desktop app with swing code) and call the class with a JSP scriplet. Is this possible?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.

You can use JNLP to web start a Swing program via the web, but you can't use Swing in the browser.

JSP is a templating language that runs on the server to deliver HTML to the browser. Perhaps this article will help.
 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok. Just curious. Thanks for the quick reply.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!