• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Can Servlet display AWT Component in the browser?

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my application used to be on applet-based. I manage to change it to a servlet.

However I wish to maintain a lot of the codes.

Currently, I want my servlet to display a dialog box with some warnings. The warnings are not hard-coded but dynamic.

In my servlet, I invoke my applet's method to create the dialog box. I did not use <EMBED> to plugin the applet cos I do not want to launch the entire applet. I only want to invoke a method from the applet which will open up the dialog box.

However the dialog box appear behind the browser.
Is there anyway to bring the dialog box to the front of the browser?

Thanks.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets run on the server.
They have nothing to do with how an applet displays dialog boxes.

Moving to the Applets forum.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umm, so you embed part of an applets code in a servlet to display a GUI? That can only work if the web server runs on the same local machine that accesses it, and it's an abuse of both applets and servlets.
If a servlet requires a Java GUI, then you should have it create web pages that do so, and -if you absolutely need Java GUI components- embed applets inside of them. Using GUI code on the server is just asking for trouble, and will not work well, or at all.
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic