Programming for WWW (ICE 1338)

28
Programming for WWW Programming for WWW (ICE 1338) (ICE 1338) Lecture #7 Lecture #7 July 14, 2004 In-Young Ko iko .AT. i cu . ac.kr Information and Communications University (ICU)

description

Programming for WWW (ICE 1338). Lecture #7 July 14, 2004 In-Young Ko iko .AT. i cu . ac.kr Information and Communications University (ICU). Announcements. Midterm Exam: 10:00AM – 11:30AM, Friday July 16 th Your grades of homework#1 are posted on the class Web page. - PowerPoint PPT Presentation

Transcript of Programming for WWW (ICE 1338)

Page 1: Programming for WWW (ICE 1338)

Programming for WWWProgramming for WWW(ICE 1338)(ICE 1338)

Lecture #7Lecture #7 July 14, 2004

In-Young Koiko .AT. icu.ac.kr

Information and Communications University (ICU)

Page 2: Programming for WWW (ICE 1338)

July 14, 2004 2 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

AnnouncementsAnnouncements

Midterm Exam:Midterm Exam: 10:00AM – 11:30AM, Friday July 1610:00AM – 11:30AM, Friday July 16 thth

Your Your grades of homework#1grades of homework#1 are posted on are posted on the class Web pagethe class Web page

Page 3: Programming for WWW (ICE 1338)

July 14, 2004 3 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Review of the Previous LectureReview of the Previous Lecture

Use of JavaScriptUse of JavaScript Document Object Model HTMLDocument Object Model HTML Data typesData types OperatorsOperators Pattern matchingPattern matching Event handlingEvent handling

Page 4: Programming for WWW (ICE 1338)

July 14, 2004 4 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Contents of Today’s LectureContents of Today’s Lecture

Java AppletsJava Applets Applet GUI structureApplet GUI structure Event handling in Applet GUIsEvent handling in Applet GUIs Concurrency in AppletsConcurrency in Applets

Plug-in programsPlug-in programs

Page 5: Programming for WWW (ICE 1338)

July 14, 2004 5 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java AppletsJava Applets Applets are relatively small Java programs Applets are relatively small Java programs

whose execution is whose execution is triggered by a browsertriggered by a browser The purpose of an applet is to provide The purpose of an applet is to provide

processingprocessing capabilitycapability and and interactivityinteractivity for HTML for HTML documents documents through widgetsthrough widgets

The The ‘standard’ operations‘standard’ operations of applets are of applets are provided by the parent class, JAppletprovided by the parent class, JApplet

public class class_name extends JApplet { … }public class class_name extends JApplet { … } UUse of applets is still widespread, and there is se of applets is still widespread, and there is

heavy use in intranetsheavy use in intranets Applets are an alternative to CGI and Applets are an alternative to CGI and

embeddedembedded client-side scriptsclient-side scriptsAW lecture notes

Page 6: Programming for WWW (ICE 1338)

July 14, 2004 6 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Applets vs. JavaScript (CGI)Applets vs. JavaScript (CGI)

CGI is faster than applets and JavaScript, but it CGI is faster than applets and JavaScript, but it is run on the serveris run on the server

JavaScript is easier to learn and use than Java, JavaScript is easier to learn and use than Java, but less expressivebut less expressive

Java is Java is fasterfaster than JavaScript than JavaScript Java Java graphics are powerfulgraphics are powerful, but JavaScript has , but JavaScript has

nonenone JavaScript does not require the JavaScript does not require the additional additional

downloaddownload from the server that is required for from the server that is required for appletsapplets

Java may become more of a server-side tool, inJava may become more of a server-side tool, in the form of servlets, than a client-side toolthe form of servlets, than a client-side tool AW lecture notes

Page 7: Programming for WWW (ICE 1338)

July 14, 2004 7 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Browser Actions for Running AppletsBrowser Actions for Running Applets

1.1. Download and instantiate the applet classDownload and instantiate the applet class2.2. Call the applet’s Call the applet’s initinit method method3.3. Call the applet’s Call the applet’s startstart method method – – ThisThis

starts the execution of the appletstarts the execution of the applet4.4. When the user takes a link from the When the user takes a link from the

document that has the applet, the document that has the applet, the browser calls the applet’s browser calls the applet’s stopstop method method

5.5. When the browser is stopped by the user, When the browser is stopped by the user, thethe browser calls the applet’s browser calls the applet’s destroydestroy methodmethod

AW lecture notes

Page 8: Programming for WWW (ICE 1338)

July 14, 2004 8 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

An ExampleAn ExampleA Scrolling BannerA Scrolling Banner

public class AppletTest public class AppletTest extends JAppletextends JApplet { { private String msg;private String msg; private boolean needToStop = false;private boolean needToStop = false;

public void public void init()init() { { msg = msg = getParametergetParameter("message");("message"); setFont(new Font("Arial", Font.BOLD, 24));setFont(new Font("Arial", Font.BOLD, 24)); }} public void public void start()start() { {

repaint();repaint(); }} public void public void paint(Graphics g)paint(Graphics g) { {

g.setColor(Color.blue);g.setColor(Color.blue); int x = getWidth(), y = 20;int x = getWidth(), y = 20; while (!needToStop && x > 20) {while (!needToStop && x > 20) { try { Thread.sleep(10); } catch(Exception e) { }try { Thread.sleep(10); } catch(Exception e) { } g.clearRect(0, 0, getWidth(), getHeight());g.clearRect(0, 0, getWidth(), getHeight()); g.drawString(msg, x--, y);g.drawString(msg, x--, y); }}

}} public void public void stop()stop() { {

needToStop = true;needToStop = true; }}}}

<applet code="AppletTest.class“ width=600 height=50> <param name=“message” value="Information and Communications University"></applet>

HTML DocumentHTML Document

Applet CodeApplet Code

Page 9: Programming for WWW (ICE 1338)

July 14, 2004 9 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Applet ParametersApplet Parameters

Applets can be sent parameters through HTML, using the Applets can be sent parameters through HTML, using the <param><param> tag and its two attributes, tag and its two attributes, namename and and valuevalue Parameter values are strings - e.g., <param name = "fruit" value Parameter values are strings - e.g., <param name = "fruit" value

= "apple">= "apple"> The applet gets the parameter values with The applet gets the parameter values with getParametergetParameter, ,

which takes the name of the parameterwhich takes the name of the parameter ee.g., .g., String myFruit = getParameter("fruit");String myFruit = getParameter("fruit"); If no parameter with the given name has been specified in the If no parameter with the given name has been specified in the

HTML document, getParameter returns nullHTML document, getParameter returns null If the parameter value is not really a string, the value If the parameter value is not really a string, the value

returned from getParameter must be converted like:returned from getParameter must be converted like:String pString = getParameter("size");String pString = getParameter("size");if (pString == null) mySize = 24;if (pString == null) mySize = 24;else mySize = Integer.parseInt(pString);else mySize = Integer.parseInt(pString);

The best place to put the code to get parameters is in The best place to put the code to get parameters is in initinitAW lecture notes

Page 10: Programming for WWW (ICE 1338)

July 14, 2004 10 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

The JApplet ClassThe JApplet Class

An applet is An applet is a panela panel that can be embedded in that can be embedded in a Web browser windowa Web browser window

An applet panel can An applet panel can contain other GUI contain other GUI componentscomponents (e.g., buttons, menus, …), and (e.g., buttons, menus, …), and customized drawingscustomized drawings (using the ‘paint’ (using the ‘paint’ method)method)

External framesExternal frames can be created from an applet can be created from an applet

Page 11: Programming for WWW (ICE 1338)

July 14, 2004 11 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Paint Method in AppletPaint Method in Applet

Always Always called by the browsercalled by the browser (not the applet (not the applet itself) when it displays/refreshes its windowitself) when it displays/refreshes its window

Takes one parameter, an object of class Takes one parameter, an object of class GraphicsGraphics, which is defined in java.awt, which is defined in java.awt

The protocol of the paint method is:The protocol of the paint method is:public void paint(Graphics grafObj) { … }public void paint(Graphics grafObj) { … }

The Graphics object is The Graphics object is created by the browsercreated by the browser Methods in Graphics: Methods in Graphics: drawImage, drawLine, drawImage, drawLine,

drawOval, drawPolygon, drawRect, drawString, drawOval, drawPolygon, drawRect, drawString, fillOval, fillPolygon, fillRect, fillOval, fillPolygon, fillRect, ……

AW lecture notes

Page 12: Programming for WWW (ICE 1338)

July 14, 2004 12 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Applet GUI StructureApplet GUI Structure

http://java.sun.com/products/jfc/tsc/articles/containers/index.html

Page 13: Programming for WWW (ICE 1338)

July 14, 2004 13 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java GUI Component LayersJava GUI Component Layers

http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html

Layered PaneLayered Pane

Page 14: Programming for WWW (ICE 1338)

July 14, 2004 14 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java GUI Program ExampleJava GUI Program Example

JLabel queryLabel = JLabel queryLabel = new JLabel("Query: ");new JLabel("Query: ");JTextField queryField = JTextField queryField = new JTextField(20);new JTextField(20);JButton searchButton = JButton searchButton = new JButton("Search");new JButton("Search");searchButton.searchButton.addActionListeneraddActionListener(new ActionListener() {(new ActionListener() {

public void actionPerformed(ActionEvent e) {public void actionPerformed(ActionEvent e) { // search action// search action}}

});});

JPanel mainPanel = JPanel mainPanel = new JPanel();new JPanel();mainPanel.mainPanel.addadd(queryLabel);(queryLabel);mainPanel.mainPanel.addadd(queryField);(queryField);mainPanel.mainPanel.addadd(searchButton);(searchButton);

JFrame mainFrame = JFrame mainFrame = new JFrame("Search Input");new JFrame("Search Input");mainFrame.mainFrame.getContentPane().addgetContentPane().add(mainPanel);(mainPanel);mainFrame.mainFrame.packpack();();mainFrame.mainFrame.showshow();();

Page 15: Programming for WWW (ICE 1338)

July 14, 2004 15 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Event Handling in JavaEvent Handling in Java An An eventevent is created by an external action such as is created by an external action such as

a user interaction through a GUIa user interaction through a GUI The The event handlerevent handler ( (event listenerevent listener) is a segment ) is a segment

of code that is called in response to an eventof code that is called in response to an event

JButton helloButton = new JButton(“Hello”);JButton helloButton = new JButton(“Hello”); helloButtonhelloButton..addActionListeneraddActionListener(new AbstractAction() {(new AbstractAction() {

public void public void actionPerformedactionPerformed(ActionEvent e) {(ActionEvent e) { System.out.println(“Hello World!”);System.out.println(“Hello World!”); }} }}

A JButtonA JButtonEEvent vent ListenersListeners

Button Pressed EventButton Pressed Event

Page 16: Programming for WWW (ICE 1338)

July 14, 2004 16 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Event Listener RegistrationEvent Listener Registration

Connection of an event to a listener is Connection of an event to a listener is established through established through event listener registrationevent listener registration Done with a method of the class that implements the Done with a method of the class that implements the

listener interface (e.g., listener interface (e.g., ActionListenerActionListener)) The panel object that holds the components can be The panel object that holds the components can be

the event listener for those componentsthe event listener for those components Event generators send messages (call methods, Event generators send messages (call methods,

e.g., e.g., actionPerformedactionPerformed) to registered event listeners ) to registered event listeners when events occurwhen events occur

Event handling methods must conform to a standard Event handling methods must conform to a standard protocol, which comes from an interfaceprotocol, which comes from an interface

Page 17: Programming for WWW (ICE 1338)

July 14, 2004 17 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Event Classes and Handler MethodsEvent Classes and Handler Methods

Semantic Event ClassesSemantic Event Classes ActionEventActionEvent - click a button, select from a menu or list, or type - click a button, select from a menu or list, or type

the enter button in a text fieldthe enter button in a text field ItemEventItemEvent - select a checkbox or list item - select a checkbox or list item TextEventTextEvent - change the contents of a text field or text area - change the contents of a text field or text area

For the two most commonly used events, ActionEvent For the two most commonly used events, ActionEvent and ItemEvent, there are the following interfaces and and ItemEvent, there are the following interfaces and handler methods:handler methods:

InterfaceInterface Handler methodHandler method-------------------------------------- --------------------------------------------------ActionListenerActionListener actionPerformedactionPerformedItemListenerItemListener itemStateChangeditemStateChanged

The methods to register the listener is the interface name The methods to register the listener is the interface name with “add” prependedwith “add” prepended

e.g., e.g., button1.addActionListener(this);button1.addActionListener(this);

Page 18: Programming for WWW (ICE 1338)

July 14, 2004 18 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Concurrency in JavaConcurrency in Java

““A program is said to be A program is said to be concurrentconcurrent if it contains if it contains more than one active execution contextmore than one active execution context” ” [M. Scott][M. Scott]

vvoid oid concurrentPrintconcurrentPrint() {() {

(new Thread () {(new Thread () { public void public void runrun() {() { while (true) {while (true) { try {try { System.out.print("A");System.out.print("A"); sleep(sleep(0,0,1);1); } catch (Exception e) { }} catch (Exception e) { } }} }).}).startstart();();

(new Thread () {(new Thread () { public void public void runrun() {() { while (true) {while (true) { try {try { System.out.print("B");System.out.print("B"); sleep(0sleep(0,1,1);); } catch (Exception e) { }} catch (Exception e) { } }} }).}).startstart();();}} Java

Forking two concurrent Forking two concurrent execution threadsexecution threads

Main Program ControlMain Program Control

Printing “A”Printing “A” Printing “B”Printing “B”

Page 19: Programming for WWW (ICE 1338)

July 14, 2004 19 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java ThreadsJava Threads A thread of controlA thread of control is a sequence of program points is a sequence of program points

reached as execution flows through the programreached as execution flows through the program Java threads are Java threads are lightweight taskslightweight tasks – all threads run in the – all threads run in the

same address spacesame address space c.f., Ada tasks are c.f., Ada tasks are heavyweightheavyweight threads ( threads (processesprocesses) that run in ) that run in

their own address spacestheir own address spaces

The The concurrent program unitsconcurrent program units in Java are methods in Java are methods named named runrun, whose code can be in concurrent execution , whose code can be in concurrent execution with other run methods and with mainwith other run methods and with main

There are two ways to implement threads, as a subclass There are two ways to implement threads, as a subclass of of ThreadThread and by implementing the interface and by implementing the interface RunnableRunnable

Two essential methods:Two essential methods: runrun is the concurrent method is the concurrent method startstart tells the run method to begin execution tells the run method to begin execution

Page 20: Programming for WWW (ICE 1338)

July 14, 2004 20 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Thread MethodsThread Methodsclass MyThread extends class MyThread extends ThreadThread { { public void public void run()run() { { … … // Task body// Task body … … }}}}……Thread aTask = new MyThread();Thread aTask = new MyThread();aTask.aTask.start()start();;……aTask.aTask.setPrioritysetPriority(Thread.MAX_PRIORITY);(Thread.MAX_PRIORITY);……aTask.aTask.yieldyield();();……aTask.aTask.sleepsleep(2000);(2000);……aTask.aTask.join()join();;……

Concurrent method Concurrent method definitiondefinition

Tells the run method to Tells the run method to begin executionbegin execution

Sets the scheduling prioritySets the scheduling priority

Gives up the processor to Gives up the processor to other threadsother threads

Blocks the thread for some Blocks the thread for some millisecondsmilliseconds

Waits for the thread to Waits for the thread to completecomplete

Page 21: Programming for WWW (ICE 1338)

July 14, 2004 21 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

An Applet with A ThreadAn Applet with A Threadpublic class AppletTestThread extends JApplet public class AppletTestThread extends JApplet implements Runnableimplements Runnable { { private String msg;private String msg; private boolean needToStop = false;private boolean needToStop = false; private int x, y;private int x, y;

public void init() {public void init() { msg = getParameter("message");msg = getParameter("message"); setFont(new Font("Arial", Font.BOLD, 24));setFont(new Font("Arial", Font.BOLD, 24));

x = getWidth(); y = 20;x = getWidth(); y = 20; }} public void start() {public void start() {

Thread appletThread = new Thread(this);Thread appletThread = new Thread(this); appletThread.start();appletThread.start();

}} public void public void run()run() { {

while (!needToStop && x-- > 20) {while (!needToStop && x-- > 20) { try { Thread.sleep(10); } catch(Exception e) { }try { Thread.sleep(10); } catch(Exception e) { } repaint();repaint(); }}

}} public void paint(Graphics g) {public void paint(Graphics g) {

g.setColor(Color.blue);g.setColor(Color.blue); g.clearRect(0, 0, getWidth(), getHeight());g.clearRect(0, 0, getWidth(), getHeight()); g.drawString(msg, x, y);g.drawString(msg, x, y);

} } ……}}

Page 22: Programming for WWW (ICE 1338)

July 14, 2004 22 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Applet & Swing ReferencesApplet & Swing References

How to make Applets:How to make Applets: http://java.sun.com/docs/books/tutorial/uiswing/components/applet.http://java.sun.com/docs/books/tutorial/uiswing/components/applet.htmlhtml

The Swing Tutorial:The Swing Tutorial: http://java.sun.com/docs/books/tutorial/uiswing/ http://java.sun.com/docs/books/tutorial/uiswing/

Painting in AWT and Swing:Painting in AWT and Swing: http://java.sun.com/products/jfc/tsc/articles/painting/http://java.sun.com/products/jfc/tsc/articles/painting/

Understanding Containers:Understanding Containers: http://java.sun.com/products/jfc/tsc/articles/containers/index.htmlhttp://java.sun.com/products/jfc/tsc/articles/containers/index.html

Page 23: Programming for WWW (ICE 1338)

July 14, 2004 23 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Plug-insPlug-ins

Code modules that are inserted into the Code modules that are inserted into the browserbrowser

Adds new capabilities to the Web browserAdds new capabilities to the Web browser e.g.,e.g.,

http://wp.netscape.com/plugins/?cp=brictrpr3

Page 24: Programming for WWW (ICE 1338)

July 14, 2004 24 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java Plug-inJava Plug-in EExtends the functionality of a web browser, xtends the functionality of a web browser,

allowing applets to be allowing applets to be run under Sun's Javrun under Sun's Java 2a 2 runtime environment (JRE)runtime environment (JRE) rather than the Java rather than the Java runtime environment that comes with the web runtime environment that comes with the web browserbrowser

Java Plug-in is pJava Plug-in is part of Sun's JRE and is art of Sun's JRE and is installed with it when the JRE is installed on a installed with it when the JRE is installed on a computercomputer or can be or can be automatically downloadedautomatically downloaded

WWorks with both Netscape and Internet Explorerorks with both Netscape and Internet Explorer MMakeakess it more suitable for it more suitable for widespread use on widespread use on

consumer client machinesconsumer client machines that typically are not that typically are not as powerful as client platforms as powerful as client platforms http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/contents.htmlhttp://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/contents.html

Page 25: Programming for WWW (ICE 1338)

July 14, 2004 25 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java Plug-in TagsJava Plug-in TagsInternet ExplorerInternet Explorer<<OBJECTOBJECT classidclassid="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA" ="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"

width=“width=“6600" height=“00" height=“550" 0" codebasecodebase="http://java.sun.com/products/plugin/autodl/="http://java.sun.com/products/plugin/autodl/ jinstall-1_4_2-windows-i586.cab"> jinstall-1_4_2-windows-i586.cab">

<PARAM name="<PARAM name="codecode" value=“" value=“AppletTestAppletTest.class"> .class"> <PARAM name="<PARAM name="codebasecodebase" value=“" value=“http://bigbear.icu.ac.kr/~iko/classes/ice1338/http://bigbear.icu.ac.kr/~iko/classes/ice1338/">"> <PARAM name="<PARAM name="typetype" value="application/x-java-applet;jpi-version=1.4.2">" value="application/x-java-applet;jpi-version=1.4.2"> <PARAM name=“<PARAM name=“messagemessage" value=“" value=“Information and Communications University”Information and Communications University”>></OBJECT></OBJECT>

NetscapeNetscape<<EMBEDEMBED typetype="application/x-java-applet;jpi-version=1.4.2“ width="200"   height="200“="application/x-java-applet;jpi-version=1.4.2“ width="200"   height="200“

pluginspagepluginspage="http://java.sun.com/j2se/1.4.2/download.html"="http://java.sun.com/j2se/1.4.2/download.html"codebasecodebase="http://bigbear.icu.ac.kr/~iko/classes/ice1338/ “="http://bigbear.icu.ac.kr/~iko/classes/ice1338/ “codecode=“AppletTest.class“=“AppletTest.class“message=“Information and Communications University“>message=“Information and Communications University“>

<NOEMBED>No Java 2 SDK, Standard Edition v 1.4.2 support for APPLET!! <NOEMBED>No Java 2 SDK, Standard Edition v 1.4.2 support for APPLET!! </NOEMBED></NOEMBED></EMBED> </EMBED>

Static Static VersioningVersioning

Page 26: Programming for WWW (ICE 1338)

July 14, 2004 26 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Autodownload Files Autodownload Files

http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/autodl-files.html

Page 27: Programming for WWW (ICE 1338)

July 14, 2004 27 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Java Plug-in Tags Java Plug-in Tags (cont.)(cont.)

Combined FormCombined Form

<<OBJECTOBJECT classidclassid="clsid:="clsid:8AD9C840-044E-11D1-B3E9-00805F499D938AD9C840-044E-11D1-B3E9-00805F499D93" " width=“width=“6600" height=“00" height=“550" 0" codebasecodebase="http://java.sun.com/products/plugin/autodl/="http://java.sun.com/products/plugin/autodl/ jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0"> jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0">

<PARAM name="<PARAM name="codecode" value=“" value=“AppletTestAppletTest.class"> .class"> <PARAM name="<PARAM name="codebasecodebase" value="" value="http://bigbear.icu.ac.kr/~iko/classes/ice1338/http://bigbear.icu.ac.kr/~iko/classes/ice1338/">"> <PARAM name="<PARAM name="typetype" value="application/x-java-applet;jpi-version=1.4.2">" value="application/x-java-applet;jpi-version=1.4.2"> <PARAM name=“<PARAM name=“messagemessage" value=“" value=“Information and Communications University”Information and Communications University”>> <COMMENT><COMMENT> <<EMBEDEMBED typetype="application/x-java-applet;jpi-version=1.4.2“ width="200"   height="200“ ="application/x-java-applet;jpi-version=1.4.2“ width="200"   height="200“

pluginspagepluginspage=http://java.sun.com/j2se/1.4.2/download.html=http://java.sun.com/j2se/1.4.2/download.html codecode=“AppletTest.class“=“AppletTest.class“ codebasecodebase="http://bigbear.icu.ac.kr/~iko/classes/ice1338/ “="http://bigbear.icu.ac.kr/~iko/classes/ice1338/ “ message=“Information and Communications University">message=“Information and Communications University">

<NOEMBED>No Java 2 SDK, Standard Edition v 1.4.2 support for APPLET!! <NOEMBED>No Java 2 SDK, Standard Edition v 1.4.2 support for APPLET!! </NOEMBED></NOEMBED> </EMBED> </EMBED> </COMMENT></COMMENT></OBJECT></OBJECT>

Dynamic Dynamic VersioningVersioning

“If no version of Java is installed, or a version less than the major version of the family is installed, then this will cause automatic redirection to the latest .cab for the latest version in the family.”

“If no version of Java is installed, or a version less than the major version of the family is installed, then this will cause automatic redirection to the latest .cab for the latest version in the family.”

Page 28: Programming for WWW (ICE 1338)

July 14, 2004 28 Programming for WWW (Lecture#7) In-Young Ko, Information Communications University

Other Plug-insOther Plug-ins Macromedia Flash PlayerMacromedia Flash Player

<object <object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“codebase=“http://download.macromedia.com/pub/http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=6,0,29,0shockwave/cabs/flash/swflash.cab#version=6,0,29,0”” width="832" height="240">width="832" height="240"> <param name="movie" value="images/flash/intropic.swf"><param name="movie" value="images/flash/intropic.swf"> <param name="quality" value="high"><param name="quality" value="high"> <embed src="images/flash/intropic.swf" quality="high" <embed src="images/flash/intropic.swf" quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer" pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash“type="application/x-shockwave-flash“ width="832" height="240">width="832" height="240"> </embed></embed></object></object>