aspose file tools
The moose likes Applets and the fly likes Can Servlet display AWT Component in the browser? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Can Servlet display AWT Component in the browser?" Watch "Can Servlet display AWT Component in the browser?" New topic
Author

Can Servlet display AWT Component in the browser?

Ken Flor
Ranch Hand

Joined: Aug 01, 2006
Posts: 34
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

Joined: Dec 11, 2004
Posts: 13410

Servlets run on the server.
They have nothing to do with how an applet displays dialog boxes.

Moving to the Applets forum.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35257
    
    7
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.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Can Servlet display AWT Component in the browser?
 
Similar Threads
creating a Browse folder dialog box using applet
How to create modal dialog boxes
Please Help ! Applet to Servlet : Content is not updated? Suspect browser cache
Cannot get Netscape 6.1 to open save as dialog box
Display a modal dialog window in an applet