Oops - did "cvs diff" instead of "cvs diff -u". Here's a better version of the patch. Please use this instead.
On Fri, 2002-09-06 at 20:15, Mark Roth wrote: > Greetings, > > Attached is a patch to the jakarta-servletapi-5 workspace with various > examples that exercise new features in JSP 2.0. I've also fixed some of > the JSP 1.2 examples (the paths were not correctly brought over when the > examples were moved to the jakarta-servletapi-5 workspace). I've also > updated some of the XML Schemas in the jsr154/ subdirectory which had > stale versions of the jsr152 schemas. > ... -- Mark Roth, Java Software JSP 2.0 Co-Specification Lead Sun Microsystems, Inc.
? jsr152/examples/jsp2 ? jsr152/examples/WEB-INF/jsp2 ? jsr152/examples/WEB-INF/classes/jsp2 ? jsr152/examples/images/read.gif Index: jsr152/examples/index.html =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/index.html,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 index.html --- jsr152/examples/index.html 27 Aug 2002 13:16:50 -0000 1.1.1.1 +++ jsr152/examples/index.html 7 Sep 2002 00:17:46 -0000 @@ -14,7 +14,8 @@ <b><font face="Arial, Helvetica, sans-serif"><font size=+2>JSP Samples</font></font></b> <p>This is a collection of samples demonstrating the usage of different -parts of the Java Server Pages (JSP) specification. +parts of the Java Server Pages (JSP) specification. Both JSP 2.0 and +JSP 1.2 examples are presented below. <p>These examples will only work when these pages are being served by a servlet engine; of course, we recommend <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>. @@ -36,6 +37,13 @@ <td>Look at the source code for the example</td> </tr> +<!--<tr VALIGN=TOP> +<td WIDTH="30"><img SRC="images/read.gif" height=24 width=24></td> + +<td>Read more about this feature</td> +--> + +</tr> <tr VALIGN=TOP> <td WIDTH="30"><img SRC="images/return.gif" height=24 width=24></td> @@ -46,6 +54,128 @@ <p>Tip: For session scoped beans to work, the cookies must be enabled. This can be done using browser options. <br> +<br> +<b><u><font size="+1">JSP 2.0 Examples</font></u></b><br> + +<table BORDER=0 CELLSPACING=5 WIDTH="85%" > +<tr valign=TOP> +<td><b>Expression Language</b></td> +</tr> + +<tr valign=TOP> +<td>Basic Arithmetic</td> +<td valign=TOP width="30%"><a href="jsp2/el/basic-arithmetic.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/el/basic-arithmetic.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/el/basic-arithmetic.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/el/basic-arithmetic.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Basic Comparisons</td> +<td valign=TOP width="30%"><a href="jsp2/el/basic-comparisons.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/el/basic-comparisons.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/el/basic-comparisons.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/el/basic-comparisons.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Implicit Objects</td> +<td valign=TOP width="30%"><a href="jsp2/el/implicit-objects.jsp?foo=bar"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/el/implicit-objects.jsp?foo=bar">Execute</a></td> + +<td width="30%"><a href="jsp2/el/implicit-objects.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/el/implicit-objects.html">Source</a></td> +</tr> +<tr valign=TOP> + +<td>Functions</td> +<td valign=TOP width="30%"><a href="jsp2/el/functions.jsp?foo=JSP+2.0"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/el/functions.jsp?foo=JSP+2.0">Execute</a></td> + +<td width="30%"><a href="jsp2/el/functions.html"><img SRC="images/code.gif" HSPACE=4 +BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/el/functions.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td><br><b>SimpleTag Handlers and JSP Fragments</b></td> +</tr> + +<tr valign=TOP> +<td>Hello World Tag</td> +<td valign=TOP width="30%"><a href="jsp2/simpletag/hello.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/simpletag/hello.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/simpletag/hello.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/simpletag/hello.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Repeat Tag</td> +<td valign=TOP width="30%"><a href="jsp2/simpletag/repeat.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/simpletag/repeat.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/simpletag/repeat.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/simpletag/repeat.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Book Example</td> +<td valign=TOP width="30%"><a href="jsp2/simpletag/book.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/simpletag/book.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/simpletag/book.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/simpletag/book.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td><br><b>Tag Files</b></td> +</tr> + +<tr valign=TOP> +<td>Hello World Tag File</td> +<td valign=TOP width="30%"><a href="jsp2/tagfiles/hello.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/tagfiles/hello.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/tagfiles/hello.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/tagfiles/hello.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Panel Tag File</td> +<td valign=TOP width="30%"><a href="jsp2/tagfiles/panel.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/tagfiles/panel.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/tagfiles/panel.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/tagfiles/panel.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Display Products Example</td> +<td valign=TOP width="30%"><a href="jsp2/tagfiles/products.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/tagfiles/products.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/tagfiles/products.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/tagfiles/products.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td><br><b>Other JSP 2.0 Features</b></td> +</tr> + +<tr valign=TOP> +<td><jsp:attribute> and <jsp:body></td> +<td valign=TOP width="30%"><a href="jsp2/jspattribute/jspattribute.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/jspattribute/jspattribute.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/jspattribute/jspattribute.html"><img +SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/jspattribute/jspattribute.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Shuffle Example</td> +<td valign=TOP width="30%"><a href="jsp2/jspattribute/shuffle.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/jspattribute/shuffle.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/jspattribute/shuffle.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/jspattribute/shuffle.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>Attributes With Dynamic Names</td> +<td valign=TOP width="30%"><a href="jsp2/misc/dynamicattrs.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/misc/dynamicattrs.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/misc/dynamicattrs.html"><img SRC="images/code.gif" +HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/misc/dynamicattrs.html">Source</a></td> +</tr> + +<tr valign=TOP> +<td>JSP Configuration</td> +<td valign=TOP width="30%"><a href="jsp2/misc/config.jsp"><img +src="images/execute.gif" hspace=4 border=0 align=top></a><a +href="jsp2/misc/config.jsp">Execute</a></td> + +<td width="30%"><a href="jsp2/misc/config.html"><img SRC="images/code.gif" HSPACE=4 +BORDER=0 height=24 width=24 align=TOP></a><a +href="jsp2/misc/config.html">Source</a></td> +</tr> + +</table> + +<br> +<b><u><font size="+1">JSP 1.2 Examples</font></u></b><br> <table BORDER=0 CELLSPACING=5 WIDTH="85%" > <tr VALIGN=TOP> <td>Numberguess </td> @@ -144,7 +274,7 @@ </tr> <tr VALIGN=TOP> -<td>Simple custom tag example</td> +<td>Custom tag example</td> <td VALIGN=TOP WIDTH="30%"><a href="simpletag/foo.jsp"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP></a><a href="simpletag/foo.jsp">Execute</a></td> Index: jsr152/examples/WEB-INF/web.xml =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/WEB-INF/web.xml,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 web.xml --- jsr152/examples/WEB-INF/web.xml 27 Aug 2002 13:16:52 -0000 1.1.1.1 +++ jsr152/examples/WEB-INF/web.xml 7 Sep 2002 00:17:46 -0000 @@ -1,10 +1,9 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE web-app - PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd"> - -<web-app> +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd" + version="2.4"> <!-- Define servlet-mapped and path-mapped example filters --> <filter> @@ -169,23 +168,47 @@ </url-pattern> </servlet-mapping> - <taglib> - <taglib-uri> - http://jakarta.apache.org/tomcat/debug-taglib - </taglib-uri> - <taglib-location> - /WEB-INF/jsp/debug-taglib.tld - </taglib-location> - </taglib> - - <taglib> - <taglib-uri> - http://jakarta.apache.org/tomcat/examples-taglib - </taglib-uri> - <taglib-location> - /WEB-INF/jsp/example-taglib.tld - </taglib-location> - </taglib> + <jsp-config> + <taglib> + <taglib-uri> + http://jakarta.apache.org/tomcat/debug-taglib + </taglib-uri> + <taglib-location> + /WEB-INF/jsp/debug-taglib.tld + </taglib-location> + </taglib> + + <taglib> + <taglib-uri> + http://jakarta.apache.org/tomcat/examples-taglib + </taglib-uri> + <taglib-location> + /WEB-INF/jsp/example-taglib.tld + </taglib-location> + </taglib> + + <taglib> + <taglib-uri> + http://jakarta.apache.org/tomcat/jsp2-example-taglib + </taglib-uri> + <taglib-location> + /WEB-INF/jsp2/jsp2-example-taglib.tld + </taglib-location> + </taglib> + + <jsp-property-group> + <description> + Special property group for JSP Configuration JSP example. + </description> + <display-name>JSPConfiguration</display-name> + <url-pattern>/jsp2/misc/config.jsp</url-pattern> + <el-enabled>false</el-enabled> + <page-encoding>ISO-8859-1</page-encoding> + <scripting-enabled>false</scripting-enabled> + <include-prelude>/jsp2/misc/prelude.jspf</include-prelude> + <include-coda>/jsp2/misc/coda.jspf</include-coda> + </jsp-property-group> + </jsp-config> <resource-ref> <res-ref-name>mail/Session</res-ref-name> @@ -198,7 +221,7 @@ <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <!-- Define the context-relative URL(s) to be protected --> - <url-pattern>/jsp/security/protected/*</url-pattern> + <url-pattern>/security/protected/*</url-pattern> <!-- If you list http methods, only those methods are protected --> <http-method>DELETE</http-method> <http-method>GET</http-method> @@ -217,8 +240,8 @@ <auth-method>FORM</auth-method> <realm-name>Example Form-Based Authentication Area</realm-name> <form-login-config> - <form-login-page>/jsp/security/protected/login.jsp</form-login-page> - <form-error-page>/jsp/security/protected/error.jsp</form-error-page> + <form-login-page>/security/protected/login.jsp</form-login-page> + <form-error-page>/security/protected/error.jsp</form-error-page> </form-login-config> </login-config> @@ -236,33 +259,33 @@ The maximum number of tax exemptions allowed to be set. </env-entry-description> <env-entry-name>maxExemptions</env-entry-name> - <env-entry-value>15</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>15</env-entry-value> </env-entry--> <env-entry> <env-entry-name>minExemptions</env-entry-name> - <env-entry-value>1</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>1</env-entry-value> </env-entry> <env-entry> <env-entry-name>foo/name1</env-entry-name> - <env-entry-value>value1</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> + <env-entry-value>value1</env-entry-value> </env-entry> <env-entry> <env-entry-name>foo/bar/name2</env-entry-name> - <env-entry-value>true</env-entry-value> <env-entry-type>java.lang.Boolean</env-entry-type> + <env-entry-value>true</env-entry-value> </env-entry> <env-entry> <env-entry-name>name3</env-entry-name> - <env-entry-value>1</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>1</env-entry-value> </env-entry> <env-entry> <env-entry-name>foo/name4</env-entry-name> - <env-entry-value>10</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>10</env-entry-value> </env-entry> <!-- EJB Reference --> Index: jsr152/examples/WEB-INF/classes/servletToJsp.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/WEB-INF/classes/servletToJsp.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 servletToJsp.java --- jsr152/examples/WEB-INF/classes/servletToJsp.java 27 Aug 2002 13:16:53 -0000 1.1.1.1 +++ jsr152/examples/WEB-INF/classes/servletToJsp.java 7 Sep 2002 00:17:46 -0000 @@ -9,7 +9,7 @@ try { // Set the attribute and Forward to hello.jsp request.setAttribute ("servletName", "servletToJsp"); - getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hello.jsp").forward(request, response); + +getServletConfig().getServletContext().getRequestDispatcher("/jsptoserv/hello.jsp").forward(request, + response); } catch (Exception ex) { ex.printStackTrace (); } Index: jsr152/examples/error/err.jsp =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/error/err.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 err.jsp --- jsr152/examples/error/err.jsp 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/error/err.jsp 7 Sep 2002 00:17:46 -0000 @@ -12,7 +12,7 @@ if (request.getParameter("name") == null) { %> - <%@ include file="/jsp/error/error.html" %> + <%@ include file="/error/error.html" %> <% } else { foo.setName(request.getParameter("name")); Index: jsr152/examples/error/err.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/error/err.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 err.txt --- jsr152/examples/error/err.txt 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/error/err.txt 7 Sep 2002 00:17:46 -0000 @@ -12,7 +12,7 @@ if (request.getParameter("name") == null) { %> - <%@ include file="/jsp/error/error.html" %> + <%@ include file="/error/error.html" %> <% } else { foo.setName(request.getParameter("name")); Index: jsr152/examples/forward/forward.jsp =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/forward/forward.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 forward.jsp --- jsr152/examples/forward/forward.jsp 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/forward/forward.jsp 7 Sep 2002 00:17:46 -0000 @@ -11,7 +11,7 @@ if (percent < 0.5) { %> -<jsp:forward page="/jsp/forward/one.jsp"/> +<jsp:forward page="/forward/one.jsp"/> <% } else { %> Index: jsr152/examples/forward/forward.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/forward/forward.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 forward.txt --- jsr152/examples/forward/forward.txt 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/forward/forward.txt 7 Sep 2002 00:17:46 -0000 @@ -11,7 +11,7 @@ if (percent < 0.5) { %> -<jsp:forward page="/jsp/forward/one.jsp"/> +<jsp:forward page="/forward/one.jsp"/> <% } else { %> Index: jsr152/examples/include/include.jsp =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/include/include.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 include.jsp --- jsr152/examples/include/include.jsp 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/include/include.jsp 7 Sep 2002 00:17:46 -0000 @@ -14,7 +14,7 @@ <%@ include file="foo.jsp" %> -<p> <jsp:include page="/jsp/include/foo.html" flush="true"/> by including the output of another JSP: +<p> <jsp:include page="/include/foo.html" flush="true"/> by including the output of +another JSP: <jsp:include page="foo.jsp" flush="true"/> Index: jsr152/examples/include/include.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/include/include.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 include.txt --- jsr152/examples/include/include.txt 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/include/include.txt 7 Sep 2002 00:17:46 -0000 @@ -8,13 +8,13 @@ <font color="red"> -<%@ page buffer="5" autoFlush="false" %> +<%@ page buffer="5kb" autoFlush="false" %> <p>In place evaluation of another JSP which gives you the current time: <%@ include file="foo.jsp" %> -<p> <jsp:include page="/jsp/include/foo.html" flush="true"/> by including the output of another JSP: +<p> <jsp:include page="/include/foo.html" flush="true"/> by including the output of +another JSP: <jsp:include page="foo.jsp" flush="true"/> Index: jsr152/examples/jsptoserv/stj.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/jsptoserv/stj.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 stj.txt --- jsr152/examples/jsptoserv/stj.txt 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/jsptoserv/stj.txt 7 Sep 2002 00:17:46 -0000 @@ -1,7 +1,3 @@ -/** - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. - */ import javax.servlet.*; import javax.servlet.http.*; @@ -13,7 +9,7 @@ try { // Set the attribute and Forward to hello.jsp request.setAttribute ("servletName", "servletToJsp"); - getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hello.jsp").forward(request, response); + +getServletConfig().getServletContext().getRequestDispatcher("/jsptoserv/hello.jsp").forward(request, + response); } catch (Exception ex) { ex.printStackTrace (); } Index: jsr152/examples/plugin/plugin.jsp =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/plugin/plugin.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 plugin.jsp --- jsr152/examples/plugin/plugin.jsp 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/plugin/plugin.jsp 7 Sep 2002 00:17:46 -0000 @@ -6,7 +6,7 @@ <title> Plugin example </title> <body bgcolor="white"> <h3> Current time is : </h3> -<jsp:plugin type="applet" code="Clock2.class" codebase="/examples/jsp/plugin/applet" jreversion="1.2" width="160" height="150" > +<jsp:plugin type="applet" code="Clock2.class" codebase="/jsp-examples/plugin/applet" +jreversion="1.2" width="160" height="150" > <jsp:fallback> Plugin tag OBJECT or EMBED not supported by browser. </jsp:fallback> Index: jsr152/examples/plugin/plugin.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/plugin/plugin.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 plugin.txt --- jsr152/examples/plugin/plugin.txt 27 Aug 2002 13:16:51 -0000 1.1.1.1 +++ jsr152/examples/plugin/plugin.txt 7 Sep 2002 00:17:46 -0000 @@ -6,7 +6,7 @@ <title> Plugin example </title> <body bgcolor="white"> <h3> Current time is : </h3> -<jsp:plugin type="applet" code="Clock2.class" codebase="/examples/jsp/plgin/applet" jreversion="1.2" width="160" height="150" > +<jsp:plugin type="applet" code="Clock2.class" codebase="/jsp-examples/plugin/applet" +jreversion="1.2" width="160" height="150" > <jsp:fallback> Plugin tag OBJECT or EMBED not supported by browser. </jsp:fallback> Index: jsr152/examples/sessions/carts.jsp =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/sessions/carts.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 carts.jsp --- jsr152/examples/sessions/carts.jsp 27 Aug 2002 13:16:50 -0000 1.1.1.1 +++ jsr152/examples/sessions/carts.jsp 7 Sep 2002 00:17:46 -0000 @@ -28,5 +28,5 @@ </FONT> <hr> -<%@ include file ="/jsp/sessions/carts.html" %> +<%@ include file ="/sessions/carts.html" %> </html> Index: jsr152/examples/sessions/carts.txt =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/sessions/carts.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 carts.txt --- jsr152/examples/sessions/carts.txt 27 Aug 2002 13:16:50 -0000 1.1.1.1 +++ jsr152/examples/sessions/carts.txt 7 Sep 2002 00:17:46 -0000 @@ -19,7 +19,7 @@ String[] items = cart.getItems(); for (int i=0; i<items.length; i++) { %> -<li> <%= items[i] %> +<li> <% out.print(util.HTMLFilter.filter(items[i])); %> <% } %> @@ -28,5 +28,5 @@ </FONT> <hr> -<%@ include file ="/jsp/sessions/carts.html" %> +<%@ include file ="/sessions/carts.html" %> </html> Index: jsr154/src/share/dtd/jsp_2_0.xsd =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr154/src/share/dtd/jsp_2_0.xsd,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 jsp_2_0.xsd --- jsr154/src/share/dtd/jsp_2_0.xsd 13 Aug 2002 16:21:47 -0000 1.1.1.1 +++ jsr154/src/share/dtd/jsp_2_0.xsd 7 Sep 2002 00:17:46 -0000 @@ -8,7 +8,7 @@ version="2.0"> <xsd:annotation> <xsd:documentation> -@(#)jsp_2_0.xsds 1.8 07/29/02 +%W% %G% </xsd:documentation> </xsd:annotation> @@ -138,6 +138,7 @@ - Control enabling of EL evaluation. - Control enabling of Scripting elements. - Indicate pageEncoding information. + - Indicating that a resource is a JSP document - Prelude and Coda automatic includes. </xsd:documentation> @@ -159,7 +160,7 @@ <xsd:annotation> <xsd:documentation> - Can be used to easily set the isElEnabled + Can be used to easily set the isELEnabled property of a group of JSP pages. By default, the EL evaluation is enabled for Web Applications using a Servlet 2.4 or greater web.xml. @@ -193,6 +194,22 @@ Can be used to easily set the isScriptingEnabled property of a group of JSP pages. By default, scripting is enabled. + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="is-xml" + type="j2ee:true-falseType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + If true, denotes that the group of resources + that match the URL pattern are JSP documents, + and thus must be interpreted as XML documents. + If false, the resources are assumed to not + be JSP documents, unless there is another + property group that indicates otherwise. </xsd:documentation> </xsd:annotation> Index: jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 web-jsptaglibrary_2_0.xsd --- jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd 13 Aug 2002 16:21:48 -0000 1.1.1.1 +++ jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd 7 Sep 2002 00:17:46 -0000 @@ -10,7 +10,7 @@ <xsd:annotation> <xsd:documentation> -@(#)web-jsptaglibrary_2_0.xsds 1.10 07/29/02 +@(#)web-jsptaglibrary_2_0.xsds 1.14 08/14/02 </xsd:documentation> </xsd:annotation> <xsd:annotation> @@ -93,6 +93,45 @@ </xsd:documentation> </xsd:annotation> + <xsd:unique name="tag-name-uniqueness"> + <xsd:annotation> + <xsd:documentation> + + The taglib element contains tag elements. + The name subelements of these elements must each be unique. + + </xsd:documentation> + </xsd:annotation> + <xsd:selector xpath="j2ee:tag"/> + <xsd:field xpath="j2ee:name"/> + </xsd:unique> + + <xsd:unique name="tag-file-name-uniqueness"> + <xsd:annotation> + <xsd:documentation> + + The taglib element contains tag-file elements. + The name subelements of these elements must each be unique. + + </xsd:documentation> + </xsd:annotation> + <xsd:selector xpath="j2ee:tag-file"/> + <xsd:field xpath="j2ee:name"/> + </xsd:unique> + + <xsd:unique name="function-name-uniqueness"> + <xsd:annotation> + <xsd:documentation> + + The taglib element contains function elements. + The name subelements of these elements must each be unique. + + </xsd:documentation> + </xsd:annotation> + <xsd:selector xpath="j2ee:function"/> + <xsd:field xpath="j2ee:name"/> + </xsd:unique> + </xsd:element> @@ -138,42 +177,6 @@ <!-- **************************************************** --> -<xsd:complexType name="fragmentInputType"> -<xsd:annotation> -<xsd:documentation> - -Describes the details of a single parameter that may be -passed from a tag handler to a fragment, when the -fragment is invoked. - -This allows the page author to know what variables to expect from the tag when passing in a fragment. - -A fragment-input element can have the following subelements: - -description Describes the purpose of this fragment-input - -name The name of the parameter to the fragment - (required) - -type The type of parameter being passed - (defaults to java.lang.String) - -</xsd:documentation> -</xsd:annotation> - <xsd:sequence> - <xsd:element name="description" - type="j2ee:descriptionType" - minOccurs="0" maxOccurs="unbounded"/> - <xsd:element name="name" - type="j2ee:java-identifierType"/> - <xsd:element name="type" - type="j2ee:fully-qualified-classType" - minOccurs="0"/> - </xsd:sequence> -</xsd:complexType> - -<!-- **************************************************** --> - <xsd:complexType name="functionType"> <xsd:annotation> <xsd:documentation> @@ -316,7 +319,9 @@ name The unique action name path Where to find the .tag file implementing this - action, relative to the location of the TLD file. + action, relative to the root of the web application or + the root of the JAR file for a tag library packaged in + a JAR. </xsd:documentation> </xsd:annotation> @@ -363,11 +368,6 @@ attribute All attributes of this action that are evaluated prior to invocation. -fragment-attribute All attributes of this action that - implement javax.servlet.jsp.tagext.JspFragment - and can be evaluated zero or more times - by the tag handler. - dynamic-attributes Whether this tag supports additional attributes with dynamic names. If true, the tag-class must implement the @@ -377,6 +377,10 @@ example Optional informal description of an example of a use of this tag +tag-extension Zero or more extensions that provide extra + information about this tag, for tool + consumption + </xsd:documentation> </xsd:annotation> @@ -437,9 +441,6 @@ <xsd:element name="attribute" type="j2ee:tld-attributeType" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element name="fragment-attribute" - type="j2ee:tld-fragmentAttributeType" - minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="dynamic-attributes" type="j2ee:generic-booleanType" minOccurs="0"/> @@ -456,6 +457,23 @@ </xsd:annotation> </xsd:element> + <xsd:element name="tag-extension" + type="j2ee:deployment-extensionType" + minOccurs="0" + maxOccurs="unbounded"> + <xsd:annotation> + <xsd:documentation> + + Tag extensions are for tool use only and must not affect + the behavior of a container. The TLD extension mechanism + only allows ignorable extensions (i.e. those without a + mustUnderstand attribute). A Tag Library is considered + invalid if it requires an extension that must be + understood by setting mustUnderstand="true". + + </xsd:documentation> + </xsd:annotation> + </xsd:element> </xsd:sequence> </xsd:complexType> @@ -497,9 +515,12 @@ function zero or more EL functions defined in this tag library +taglib-extension zero or more extensions that provide extra + information about this taglib, for tool + consumption + </xsd:documentation> </xsd:annotation> - <xsd:sequence> <xsd:element name="description" type="j2ee:descriptionType" @@ -574,6 +595,23 @@ type="j2ee:functionType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:element name="taglib-extension" + type="j2ee:deployment-extensionType" + minOccurs="0" + maxOccurs="unbounded"> + <xsd:annotation> + <xsd:documentation> + + Taglib extensions are for tool use only and must not affect + the behavior of a container. The TLD extension mechanism + only allows ignorable extensions (i.e. those without a + mustUnderstand attribute). A Tag Library is considered + invalid if it requires an extension that must be + understood by setting mustUnderstand="true". + + </xsd:documentation> + </xsd:annotation> + </xsd:element> </xsd:sequence> <xsd:attribute name="version" type="j2ee:dewey-versionType" @@ -615,6 +653,8 @@ type the type of the attributes +fragment whether this attribute is a fragment + </xsd:documentation> </xsd:annotation> <xsd:sequence> @@ -638,39 +678,58 @@ </xsd:documentation> </xsd:annotation> </xsd:element> - <xsd:element name="rtexprvalue" - type="j2ee:generic-booleanType" - minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - - Defines if the nesting attribute can have scriptlet - expressions as a value, i.e the value of the - attribute may be dynamically calculated at request - time, as opposed to a static value determined at - translation time. - - If not present then the default is "false", i.e the - attribute has a static value - - </xsd:documentation> - </xsd:annotation> - - </xsd:element> - <xsd:element name="type" - type="j2ee:fully-qualified-classType" - minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - - Defines the Java type of the attributes value. For - static values (those determined at translation time) - the type is always java.lang.String. - - </xsd:documentation> - </xsd:annotation> - </xsd:element> + <xsd:choice> + <xsd:sequence> + <xsd:element name="rtexprvalue" + type="j2ee:generic-booleanType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + Defines if the nesting attribute can have scriptlet + expressions as a value, i.e the value of the + attribute may be dynamically calculated at request + time, as opposed to a static value determined at + translation time. + + If not present then the default is "false", i.e the + attribute has a static value + + </xsd:documentation> + </xsd:annotation> + + </xsd:element> + <xsd:element name="type" + type="j2ee:fully-qualified-classType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + Defines the Java type of the attributes value. For + static values (those determined at translation time) + the type is always java.lang.String. + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + <xsd:element name="fragment" + type="j2ee:generic-booleanType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + "true" if this attribute is of type + javax.jsp.tagext.JspFragment, representing dynamic + content that can be re-evaluated as many times + as needed by the tag handler. If omitted or "false", + the default is still type="java.lang.String" + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:choice> </xsd:sequence> </xsd:complexType> @@ -695,63 +754,6 @@ <!-- **************************************************** --> -<xsd:complexType name="tld-fragmentAttributeType"> -<xsd:annotation> -<xsd:documentation> - -Defines the details of an attribute of type -javax.servlet.jsp.tagext.JspFragment. - -Attributes defined of this type can be evaluated zero -or more times by a tag handler. - -A fragment-attribute element can have the following -subelements: - -description Describes the purpose of this - fragment-attribute. - -name The name of the fragment attribute. - -required True if this fragment is required, or false - if optional. Defaults to false. - -fragment-input The types of inputs that may be passed to - this fragment by the tag handler. - -</xsd:documentation> -</xsd:annotation> - <xsd:sequence> - <xsd:element name="description" - type="j2ee:descriptionType" - minOccurs="0" maxOccurs="unbounded"/> - <xsd:element name="name" - type="j2ee:java-identifierType"/> - <xsd:element name="required" - type="j2ee:generic-booleanType" - minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - - Defines if the nesting fragment attribute is - required or optional. - - If not present then the default is "false", i.e the - fragment attribute is optional. - - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="fragment-input" - type="j2ee:fragmentInputType" - minOccurs="0" - maxOccurs="unbounded"/> - - </xsd:sequence> -</xsd:complexType> - -<!-- **************************************************** --> - <xsd:complexType name="validatorType"> <xsd:annotation> <xsd:documentation> @@ -851,6 +853,10 @@ scope The scope of the scripting varaible defined. NESTED is default. +fragment The fragment to which the variable + is scoped. (incompatible with scope + attribute) + </xsd:documentation> </xsd:annotation> @@ -896,31 +902,52 @@ </xsd:annotation> </xsd:element> - <xsd:element name="declare" - type="j2ee:generic-booleanType" - minOccurs="0"> - - <xsd:annotation> - <xsd:documentation> - - Whether the scripting variable is to be defined - or not. See TagExtraInfo for details. This - element is optional and "true" is the default. - - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="scope" - type="j2ee:variable-scopeType" - minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - - The element is optional and "NESTED" is the default. - </xsd:documentation> - </xsd:annotation> - </xsd:element> + <xsd:choice> + <xsd:sequence> + <xsd:element name="declare" + type="j2ee:generic-booleanType" + minOccurs="0"> + + <xsd:annotation> + <xsd:documentation> + + Whether the scripting variable is to be defined + or not. See TagExtraInfo for details. This + element is optional and "true" is the default. + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="scope" + type="j2ee:variable-scopeType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + The element is optional and "NESTED" is the default. + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + <xsd:element name="fragment" + type="j2ee:java-identifierType" + minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + + Must match the value of a name attribute in an + attribute element whose fragment attribute is + set to "true". If so specified, this variable's + scope is restricted to that fragment invocation. + If not specified, the default is declare="true" + and scope="NESTED" + + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:choice> </xsd:sequence> </xsd:complexType>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>