Hello: I am new to servlet technolygy. How can I launch an applet/application from a servlet? I saw the following code snippet out.println(<"APPLET CODE=Foo.class CODEBASE=/applets WIDTH=400 HEIGHT=400"> ; In the servlet class, will this be the only line of code there? What else would I need to do? If an application, where would I put the appletviewer statement? Your help is appreciated!
The main thing to remember is that servlets typically write HTML pages, so anything you might do with an applet in a static HTML page can be done through a servlet generated page. The servlet has to generate the complete page so you will certainly be writing more code than just the one line. Bill
you do not need appletviewer statement. Appletviewer is just a tool for testing an applet. You do need to produce a right HTML code. If you use swing in your appltes you need to have java plugin installed and you need to create a right html (could be produced by HTML Converter) in you servlet.
Joined: Jul 25, 2002
I appreciate your quick responses! However, it did not help me, because I did not understand what you meant. I'm just now going through the moreservlets text by Marty Hall, and am at chapter 3. I do not yet have any in-depth knowledge of servlets, or how to implement any of the things you suggested. Can someone please be a bit more specific, with a dummy code if possible? Thanks very much!