Java/JSP/Collaboration

Материал из Java эксперт
Версия от 18:01, 31 мая 2010; (обсуждение)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

JSP and Applet

<%@ 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>
<h2>The time...</h2>
<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 <br />
</jsp:fallback>
</jsp:plugin>
<br /><c:out value="${date}"/>
</body>
</html>





JSP and Applet 1

<html>
<head>
<title>Using the Java Plugin</title>
</head>
<body>
<h1>Applet running in the plugin</h1>
<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>





JSP and embedded Wmp

<%@ 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>
<h2>The Who</h2>
<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">
<!-- <EMBED SRC=
   "http://www.parkerriver.ru/films/who_baba.mov" WIDTH="240" HEIGHT="196" 
    AUTOPLAY="true" CONTROLLER=
    "true" PLUGINSPAGE="http://www.apple.ru/quicktime/download/">
</EMBED> -->
</OBJECT>
<br /><rt_c:out value="${date}"/>
</body>
</html>





JSP and Flash page

<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>





JSP, HTML and SVG (Scaleable Vector Graphics)

<%@ 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>
<h2>A Scaleable Vector Graphics example</h2>
<embed src=
    "testLogo.svg" width="200" height="200" type=
    "image/svg-xml" pluginspage="http://www.adobe.ru/svg/viewer/install/"
>
<br /><c:out value="${date}"/>
</body>
</html>





JSPs and Servlets

/*
Beginning JavaServer Pages
Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell
ISBN: 0-7645-7485-X
*/





JSPs and Servlets 2

/*
Beginning JavaServer Pages
Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell
ISBN: 0-7645-7485-X
*/





JSP standard actions: JSP and applet

/*
Beginning JavaServer Pages
Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell
ISBN: 0-7645-7485-X
*/





JSTL: Flash in a JSP

<%@ 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>
<h2>Enjoy the Flash Movie</h2>
<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>
<br /><c:out value="${date}"/>
</body>
</html>





JSTL: work with applet

<%@ 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>
<h2>The time...</h2>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<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>
<!--
<APPLET CODE = "Clock.class" JAVA_CODEBASE = "http://localhost:8080/home/applets">

</APPLET>
-->

<!--"END_CONVERTED_APPLET"-->

<br /><c:out value="${date}"/>
</body>
</html>