KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > debugger > presentation > AppletFrame


1 /*-----------------------------------------------------------------------------
2  * Enhydra Java Application Server
3  * Copyright 1997-2000 Lutris Technologies, Inc.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this software
15  * must display the following acknowledgement:
16  * This product includes Enhydra software developed by Lutris
17  * Technologies, Inc. and its contributors.
18  * 4. Neither the name of Lutris Technologies nor the names of its contributors
19  * may be used to endorse or promote products derived from this software
20  * without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY LUTRIS TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED. IN NO EVENT SHALL LUTRIS TECHNOLOGIES OR CONTRIBUTORS BE
26  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *-----------------------------------------------------------------------------
34  * $Id: AppletFrame.java,v 1.1 2004/04/06 15:24:32 rale Exp $
35  *-----------------------------------------------------------------------------
36  */

37
38 package com.lutris.appserver.debugger.presentation;
39
40 import com.lutris.appserver.server.*;
41 import com.lutris.appserver.server.httpPresentation.*;
42
43
44
45
46 /**
47  * This is the frame where the APPLET tag is that displays the debugger applet.
48  * Because of problems with the various versions of swing on different
49  * platforms, we include the swingall.jar in the debugger.jar and use the
50  * ARCHIVE=swingall.jar attribute on the APPLET tag.
51  */

52 public class AppletFrame implements HttpPresentation {
53
54     public void run(HttpPresentationComms comms) throws Exception JavaDoc {
55     comms.response.setContentType("text/html");
56 /*
57         comms.response.getOutputStream().print(
58           "<HTML><HEAD></HEAD><BODY BGCOLOR=#CCCCCC>" +
59           "<APPLET " +
60               "CODEBASE=. " +
61               "ARCHIVE=swingall.jar " +
62               "CODE=com.lutris.appserver.debugger.applet.DebuggerApplet " +
63               "WIDTH=220 " +
64               "HEIGHT=460> " +
65             "<B><I>This feature depends on applet support.</I></B>" +
66           "</APPLET>" +
67           "<FONT SIZE=-2><BR></FONT>" +
68           "<CENTER><FONT SIZE=-2>&nbsp;<BR></FONT><A HREF=http://www.enhydra.org TARGET=eWindow>" +
69             "<IMG SRC=Enhydra.gif BORDER=0>" +
70           "</A></CENTER>" +
71           "</BODY></HTML>");
72 */

73         String JavaDoc out="<OBJECT classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"+
74                     " width=220 height=460"+
75                     " codebase=http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0>"+
76                     "<PARAM name=ARCHIVE value=Debugger.jar>"+
77                     "<PARAM name=CODE value=com.lutris.appserver.debugger.applet.DebuggerApplet>"+
78                     "<PARAM name=type value=application/x-java-applet;version=1.3>"+
79                 "</OBJECT>"+
80                "<COMMENT>"+
81                "<EMBED NAME=Debugger"+
82                " TYPE=application/x-java-applet;version=1.3"+
83                " ARCHIVE=Debugger.jar"+
84                " CODE=com.lutris.appserver.debugger.applet.DebuggerApplet"+
85                " WIDTH=220"+
86                " HEIGHT=460"+
87                  " pluginspage=http://java.sun.com/products/plugin/index.html#download>"+
88                "<NOEMBED> This browser does not appear to support Applets. </NOEMBED>"+
89                "</EMBED> </COMMENT> </OBJECT>"+
90           "<FONT SIZE=-2><BR></FONT>" +
91           "<CENTER><FONT SIZE=-2>&nbsp;<BR></FONT><A HREF=http://www.enhydra.org TARGET=eWindow>" +
92             "<IMG SRC=media/Enhydra.gif BORDER=0>" +
93           "</A></CENTER>" +
94           "</BODY></HTML>";
95         comms.response.getOutputStream().print(out);
96
97
98     }
99
100
101 }
102
Popular Tags