• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Servlet display AWT Component in the browser?

 
Ken Flor
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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic