Java/JSP/Collaboration
Содержание
- 1 JSP and Applet
- 2 The time...
- 3 JSP and Applet 1
- 4 Applet running in the plugin
- 4.1 JSP and embedded Wmp
- 4.2 The Who
- 4.3 JSP and Flash page
- 4.4 JSP, HTML and SVG (Scaleable Vector Graphics)
- 4.5 A Scaleable Vector Graphics example
- 4.6 JSPs and Servlets
- 4.7 JSPs and Servlets 2
- 4.8 JSP standard actions: JSP and applet
- 4.9 JSTL: Flash in a JSP
- 4.10 Enjoy the Flash Movie
- 4.11 JSTL: work with applet
- 4.12 The time...
JSP and Applet
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <jsp:useBean id="date" class="java.util.Date" /> <html> <head><title>A Clock in a JSP</title></head> <body>
The time...
<jsp:plugin type="applet" code="Clock.class" codebase=
"http://localhost:8080/home/applets" jreversion="1.4.1">
<jsp:params>
<jsp:param name="scriptable" value="false"/>
</jsp:params>
<jsp:fallback>
Sorry, we are unable to start the Java plugin
</jsp:fallback>
</jsp:plugin>
<c:out value="${date}"/>
</body>
</html>
</source>
JSP and Applet 1
<source lang="java">
<html> <head> <title>Using the Java Plugin</title> </head> <body>
Applet running in the plugin
<jsp:plugin type="applet" code="BasicApplet.class" width="90%" height="100">
<jsp:params> <jsp:param name="text" value="Hello from the applet"/> </jsp:params> <jsp:fallback> Your browser can"t display this applet. Sorry </jsp:fallback>
</jsp:plugin> </body> </html>
</source>
JSP and embedded Wmp
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="rt_c" %> <jsp:useBean id="date" class="java.util.Date" /> <html> <head><title>Windows Media in a JSP</title></head> <body>
The Who
<OBJECT CLASSID=
"clsid:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.ru/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,7,1112"> <PARAM name="autoStart" VALUE="true"> <PARAM name="URL" VALUE="http://localhost:8080/home/faithhill_yourestillhere_56-v[1].asx">
</OBJECT>
<rt_c:out value="${date}"/>
</body>
</html>
</source>
JSP and Flash page
<source lang="java">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="400" id="example" ALIGN=""> <PARAM NAME=movie VALUE="example.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="example.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="example" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.ru/go/getflashplayer"></EMBED>
</OBJECT>
</source>
JSP, HTML and SVG (Scaleable Vector Graphics)
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <jsp:useBean id="date" class="java.util.Date" /> <html> <head><title>SVG in a JSP</title></head> <body>
A Scaleable Vector Graphics example
<embed src=
"testLogo.svg" width="200" height="200" type= "image/svg-xml" pluginspage="http://www.adobe.ru/svg/viewer/install/"
>
<c:out value="${date}"/>
</body>
</html>
</source>
JSPs and Servlets
<source lang="java">
/* Beginning JavaServer Pages Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell ISBN: 0-7645-7485-X
- /
</source>
JSPs and Servlets 2
<source lang="java">
/* Beginning JavaServer Pages Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell ISBN: 0-7645-7485-X
- /
</source>
JSP standard actions: JSP and applet
<source lang="java">
/* Beginning JavaServer Pages Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell ISBN: 0-7645-7485-X
- /
</source>
JSTL: Flash in a JSP
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <jsp:useBean id="date" class="java.util.Date" /> <html> <head><title>Flash in a JSP</title></head> <body>
Enjoy the Flash Movie
<OBJECT CLASSID=
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE= "http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab# version=6,040,0" width="293" height="423"
> <PARAM name="movie" VALUE="coolFlashMov.swf"> <PARAM name="quality" VALUE="high"> <PARAM name="bgcolor" VALUE="#FFFFFF"> <EMBED SRC=
"coolFlashMov.swf" quality="high" width="293" height="423" bgcolor="#FFFFFF" type="application/x-shockwave-flash" PLUGINSPAGE= "http://www.macromedia.ru/go/getflashplayer"
>
</EMBED>
</OBJECT>
<c:out value="${date}"/>
</body>
</html>
</source>
JSTL: work with applet
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %> <jsp:useBean id="date" class="java.util.Date" /> <html> <head><title>A Clock in a JSP</title></head> <body>
The time...
<OBJECT
classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase = "http://java.sun.ru/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" > <PARAM NAME = CODE VALUE = "Clock.class" > <PARAM NAME = CODEBASE VALUE = "http://localhost:8080/home/applets" > <PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.4"> <PARAM NAME = "scriptable" VALUE = "false"> <COMMENT> <EMBED type = "application/x-java-applet;version=1.4" CODE = "Clock.class" JAVA_CODEBASE = "http://localhost:8080/home/applets" scriptable = false pluginspage = "http://java.sun.ru/products/plugin/index.html#download"> <NOEMBED> </NOEMBED> </EMBED> </COMMENT>
</OBJECT>
<c:out value="${date}"/>
</body>
</html>
</source>