初始提交
diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/Functions.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/Functions.java.html
new file mode 100644
index 0000000..350fce6
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/Functions.java.html
@@ -0,0 +1,45 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+package jsp2.examples.el;

+

+/**

+ * Defines the functions for the jsp2 example tag library.

+ * 

+ * &lt;p>Each function is defined as a static method.&lt;/p>

+ */

+public class Functions {

+    public static String reverse( String text ) {

+        return new StringBuffer( text ).reverse().toString();

+    }

+

+    public static int numVowels( String text ) {

+        String vowels = "aeiouAEIOU";

+	int result = 0;

+        for( int i = 0; i &lt; text.length(); i++ ) {

+	    if( vowels.indexOf( text.charAt( i ) ) != -1 ) {

+	        result++;

+	    }

+	}

+	return result;

+    }

+

+    public static String caps( String text ) {

+        return text.toUpperCase();

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.html
new file mode 100644
index 0000000..ca88b7f
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.html
@@ -0,0 +1,30 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="basic-arithmetic.jsp"><img src="../../images/execute.gif" align="right" border="0"></a><a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="basic-arithmetic.jsp.html">Source Code for Basic Arithmetic Example<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp
new file mode 100644
index 0000000..e2ec74c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp
@@ -0,0 +1,88 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<html>

+  <head>

+    <title>JSP 2.0 Expression Language - Basic Arithmetic</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Expression Language - Basic Arithmetic</h1>

+    <hr>

+    This example illustrates basic Expression Language arithmetic.

+    Addition (+), subtraction (-), multiplication (*), division (/ or div), 

+    and modulus (% or mod) are all supported.  Error conditions, like

+    division by zero, are handled gracefully.

+    <br>

+    <blockquote>

+      <code>

+        <table border="1">

+          <thead>

+	    <td><b>EL Expression</b></td>

+	    <td><b>Result</b></td>

+	  </thead>

+	  <tr>

+	    <td>\${1}</td>

+	    <td>${1}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1 + 2}</td>

+	    <td>${1 + 2}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1.2 + 2.3}</td>

+	    <td>${1.2 + 2.3}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1.2E4 + 1.4}</td>

+	    <td>${1.2E4 + 1.4}</td>

+	  </tr>

+	  <tr>

+	    <td>\${-4 - 2}</td>

+	    <td>${-4 - 2}</td>

+	  </tr>

+	  <tr>

+	    <td>\${21 * 2}</td>

+	    <td>${21 * 2}</td>

+	  </tr>

+	  <tr>

+	    <td>\${3/4}</td>

+	    <td>${3/4}</td>

+	  </tr>

+	  <tr>

+	    <td>\${3 div 4}</td>

+	    <td>${3 div 4}</td>

+	  </tr>

+	  <tr>

+	    <td>\${3/0}</td>

+	    <td>${3/0}</td>

+	  </tr>

+	  <tr>

+	    <td>\${10%4}</td>

+	    <td>${10%4}</td>

+	  </tr>

+	  <tr>

+	    <td>\${10 mod 4}</td>

+	    <td>${10 mod 4}</td>

+	  </tr>

+    <tr>

+      <td>\${(1==2) ? 3 : 4}</td>

+      <td>${(1==2) ? 3 : 4}</td>

+    </tr>

+	</table>

+      </code>

+    </blockquote>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp.html
new file mode 100644
index 0000000..4aa05c8
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp.html
@@ -0,0 +1,90 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Expression Language - Basic Arithmetic&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Expression Language - Basic Arithmetic&lt;/h1>

+    &lt;hr>

+    This example illustrates basic Expression Language arithmetic.

+    Addition (+), subtraction (-), multiplication (*), division (/ or div), 

+    and modulus (% or mod) are all supported.  Error conditions, like

+    division by zero, are handled gracefully.

+    &lt;br>

+    &lt;blockquote>

+      &lt;code>

+        &lt;table border="1">

+          &lt;thead>

+	    &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Result&lt;/b>&lt;/td>

+	  &lt;/thead>

+	  &lt;tr>

+	    &lt;td>\${1}&lt;/td>

+	    &lt;td>${1}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1 + 2}&lt;/td>

+	    &lt;td>${1 + 2}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1.2 + 2.3}&lt;/td>

+	    &lt;td>${1.2 + 2.3}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1.2E4 + 1.4}&lt;/td>

+	    &lt;td>${1.2E4 + 1.4}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${-4 - 2}&lt;/td>

+	    &lt;td>${-4 - 2}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${21 * 2}&lt;/td>

+	    &lt;td>${21 * 2}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${3/4}&lt;/td>

+	    &lt;td>${3/4}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${3 div 4}&lt;/td>

+	    &lt;td>${3 div 4}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${3/0}&lt;/td>

+	    &lt;td>${3/0}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${10%4}&lt;/td>

+	    &lt;td>${10%4}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${10 mod 4}&lt;/td>

+	    &lt;td>${10 mod 4}&lt;/td>

+	  &lt;/tr>

+    &lt;tr>

+      &lt;td>\${(1==2) ? 3 : 4}&lt;/td>

+      &lt;td>${(1==2) ? 3 : 4}&lt;/td>

+    &lt;/tr>

+	&lt;/table>

+      &lt;/code>

+    &lt;/blockquote>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.html
new file mode 100644
index 0000000..0102232
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.html
@@ -0,0 +1,30 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="basic-comparisons.jsp"><img src="../../images/execute.gif" align="right" border="0"></a><a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="basic-comparisons.jsp.html">Source Code for Basic Comparisons Example<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp
new file mode 100644
index 0000000..e01188a
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp
@@ -0,0 +1,116 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<html>

+  <head>

+    <title>JSP 2.0 Expression Language - Basic Comparisons</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Expression Language - Basic Comparisons</h1>

+    <hr>

+    This example illustrates basic Expression Language comparisons.

+    The following comparison operators are supported:

+    <ul>

+      <li>Less-than (&lt; or lt)</li>

+      <li>Greater-than (&gt; or gt)</li>

+      <li>Less-than-or-equal (&lt;= or le)</li>

+      <li>Greater-than-or-equal (&gt;= or ge)</li>

+      <li>Equal (== or eq)</li>

+      <li>Not Equal (!= or ne)</li>

+    </ul>

+    <blockquote>

+      <u><b>Numeric</b></u>

+      <code>

+        <table border="1">

+          <thead>

+	    <td><b>EL Expression</b></td>

+	    <td><b>Result</b></td>

+	  </thead>

+	  <tr>

+	    <td>\${1 &lt; 2}</td>

+	    <td>${1 < 2}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1 lt 2}</td>

+	    <td>${1 lt 2}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1 &gt; (4/2)}</td>

+	    <td>${1 > (4/2)}</td>

+	  </tr>

+	  <tr>

+	    <td>\${1 gt (4/2)}</td>

+	    <td>${1 gt (4/2)}</td>

+	  </tr>

+	  <tr>

+	    <td>\${4.0 &gt;= 3}</td>

+	    <td>${4.0 >= 3}</td>

+	  </tr>

+	  <tr>

+	    <td>\${4.0 ge 3}</td>

+	    <td>${4.0 ge 3}</td>

+	  </tr>

+	  <tr>

+	    <td>\${4 &lt;= 3}</td>

+	    <td>${4 <= 3}</td>

+	  </tr>

+	  <tr>

+	    <td>\${4 le 3}</td>

+	    <td>${4 le 3}</td>

+	  </tr>

+	  <tr>

+	    <td>\${100.0 == 100}</td>

+	    <td>${100.0 == 100}</td>

+	  </tr>

+	  <tr>

+	    <td>\${100.0 eq 100}</td>

+	    <td>${100.0 eq 100}</td>

+	  </tr>

+	  <tr>

+	    <td>\${(10*10) != 100}</td>

+	    <td>${(10*10) != 100}</td>

+	  </tr>

+	  <tr>

+	    <td>\${(10*10) ne 100}</td>

+	    <td>${(10*10) ne 100}</td>

+	  </tr>

+	</table>

+      </code>

+      <br>

+      <u><b>Alphabetic</b></u>

+      <code>

+        <table border="1">

+          <thead>

+	    <td><b>EL Expression</b></td>

+	    <td><b>Result</b></td>

+	  </thead>

+	  <tr>

+	    <td>\${'a' &lt; 'b'}</td>

+	    <td>${'a' < 'b'}</td>

+	  </tr>

+	  <tr>

+	    <td>\${'hip' &gt; 'hit'}</td>

+	    <td>${'hip' > 'hit'}</td>

+	  </tr>

+	  <tr>

+	    <td>\${'4' &gt; 3}</td>

+	    <td>${'4' > 3}</td>

+	  </tr>

+	</table>

+      </code>

+    </blockquote>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp.html
new file mode 100644
index 0000000..efc4da3
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp.html
@@ -0,0 +1,118 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Expression Language - Basic Comparisons&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Expression Language - Basic Comparisons&lt;/h1>

+    &lt;hr>

+    This example illustrates basic Expression Language comparisons.

+    The following comparison operators are supported:

+    &lt;ul>

+      &lt;li>Less-than (&amp;lt; or lt)&lt;/li>

+      &lt;li>Greater-than (&amp;gt; or gt)&lt;/li>

+      &lt;li>Less-than-or-equal (&amp;lt;= or le)&lt;/li>

+      &lt;li>Greater-than-or-equal (&amp;gt;= or ge)&lt;/li>

+      &lt;li>Equal (== or eq)&lt;/li>

+      &lt;li>Not Equal (!= or ne)&lt;/li>

+    &lt;/ul>

+    &lt;blockquote>

+      &lt;u>&lt;b>Numeric&lt;/b>&lt;/u>

+      &lt;code>

+        &lt;table border="1">

+          &lt;thead>

+	    &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Result&lt;/b>&lt;/td>

+	  &lt;/thead>

+	  &lt;tr>

+	    &lt;td>\${1 &amp;lt; 2}&lt;/td>

+	    &lt;td>${1 &lt; 2}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1 lt 2}&lt;/td>

+	    &lt;td>${1 lt 2}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1 &amp;gt; (4/2)}&lt;/td>

+	    &lt;td>${1 > (4/2)}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${1 gt (4/2)}&lt;/td>

+	    &lt;td>${1 gt (4/2)}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${4.0 &amp;gt;= 3}&lt;/td>

+	    &lt;td>${4.0 >= 3}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${4.0 ge 3}&lt;/td>

+	    &lt;td>${4.0 ge 3}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${4 &amp;lt;= 3}&lt;/td>

+	    &lt;td>${4 &lt;= 3}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${4 le 3}&lt;/td>

+	    &lt;td>${4 le 3}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${100.0 == 100}&lt;/td>

+	    &lt;td>${100.0 == 100}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${100.0 eq 100}&lt;/td>

+	    &lt;td>${100.0 eq 100}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${(10*10) != 100}&lt;/td>

+	    &lt;td>${(10*10) != 100}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${(10*10) ne 100}&lt;/td>

+	    &lt;td>${(10*10) ne 100}&lt;/td>

+	  &lt;/tr>

+	&lt;/table>

+      &lt;/code>

+      &lt;br>

+      &lt;u>&lt;b>Alphabetic&lt;/b>&lt;/u>

+      &lt;code>

+        &lt;table border="1">

+          &lt;thead>

+	    &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Result&lt;/b>&lt;/td>

+	  &lt;/thead>

+	  &lt;tr>

+	    &lt;td>\${'a' &amp;lt; 'b'}&lt;/td>

+	    &lt;td>${'a' &lt; 'b'}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${'hip' &amp;gt; 'hit'}&lt;/td>

+	    &lt;td>${'hip' > 'hit'}&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${'4' &amp;gt; 3}&lt;/td>

+	    &lt;td>${'4' > 3}&lt;/td>

+	  &lt;/tr>

+	&lt;/table>

+      &lt;/code>

+    &lt;/blockquote>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.html
new file mode 100644
index 0000000..0fdb080
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.html
@@ -0,0 +1,32 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="functions.jsp?foo=JSP+2.0"><img src="../../images/execute.gif" align="right" border="0"></a><a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="functions.jsp.html">Source Code for functions.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="Functions.java.html">Source Code for Functions.java<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp
new file mode 100644
index 0000000..66478c0
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp
@@ -0,0 +1,66 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+<html>

+  <head>

+    <title>JSP 2.0 Expression Language - Functions</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Expression Language - Functions</h1>

+    <hr>

+    An upgrade from the JSTL expression language, the JSP 2.0 EL also

+    allows for simple function invocation.  Functions are defined

+    by tag libraries and are implemented by a Java programmer as 

+    static methods.

+

+    <blockquote>

+      <u><b>Change Parameter</b></u>

+      <form action="functions.jsp" method="GET">

+	  foo = <input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">

+          <input type="submit">

+      </form>

+      <br>

+      <code>

+        <table border="1">

+          <thead>

+	    <td><b>EL Expression</b></td>

+	    <td><b>Result</b></td>

+	  </thead>

+	  <tr>

+	    <td>\${param["foo"]}</td>

+	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${my:reverse(param["foo"])}</td>

+	    <td>${my:reverse(fn:escapeXml(param["foo"]))}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${my:reverse(my:reverse(param["foo"]))}</td>

+	    <td>${my:reverse(my:reverse(fn:escapeXml(param["foo"])))}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${my:countVowels(param["foo"])}</td>

+	    <td>${my:countVowels(fn:escapeXml(param["foo"]))}&nbsp;</td>

+	  </tr>

+	</table>

+      </code>

+    </blockquote>

+  </body>

+</html>

+

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp.html
new file mode 100644
index 0000000..9ac0c79
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/functions.jsp.html
@@ -0,0 +1,68 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

+&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Expression Language - Functions&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Expression Language - Functions&lt;/h1>

+    &lt;hr>

+    An upgrade from the JSTL expression language, the JSP 2.0 EL also

+    allows for simple function invocation.  Functions are defined

+    by tag libraries and are implemented by a Java programmer as 

+    static methods.

+

+    &lt;blockquote>

+      &lt;u>&lt;b>Change Parameter&lt;/b>&lt;/u>

+      &lt;form action="functions.jsp" method="GET">

+	  foo = &lt;input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">

+          &lt;input type="submit">

+      &lt;/form>

+      &lt;br>

+      &lt;code>

+        &lt;table border="1">

+          &lt;thead>

+	    &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Result&lt;/b>&lt;/td>

+	  &lt;/thead>

+	  &lt;tr>

+	    &lt;td>\${param["foo"]}&lt;/td>

+	    &lt;td>${fn:escapeXml(param["foo"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${my:reverse(param["foo"])}&lt;/td>

+	    &lt;td>${my:reverse(fn:escapeXml(param["foo"]))}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${my:reverse(my:reverse(param["foo"]))}&lt;/td>

+	    &lt;td>${my:reverse(my:reverse(fn:escapeXml(param["foo"])))}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${my:countVowels(param["foo"])}&lt;/td>

+	    &lt;td>${my:countVowels(fn:escapeXml(param["foo"]))}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	&lt;/table>

+      &lt;/code>

+    &lt;/blockquote>

+  &lt;/body>

+&lt;/html>

+

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.html
new file mode 100644
index 0000000..2046603
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.html
@@ -0,0 +1,31 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="implicit-objects.jsp?foo=bar"><img src="../../images/execute.gif" align="right" border="0"></a><a href="../../index.html">

+<img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="implicit-objects.jsp.html">Source Code for Implicit Objects Example<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp
new file mode 100644
index 0000000..8d6841a
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp
@@ -0,0 +1,89 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

+

+<html>

+  <head>

+    <title>JSP 2.0 Expression Language - Implicit Objects</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Expression Language - Implicit Objects</h1>

+    <hr>

+    This example illustrates some of the implicit objects available 

+    in the Expression Lanaguage.  The following implicit objects are 

+    available (not all illustrated here):

+    <ul>

+      <li>pageContext - the PageContext object</li>

+      <li>pageScope - a Map that maps page-scoped attribute names to 

+          their values</li>

+      <li>requestScope - a Map that maps request-scoped attribute names 

+          to their values</li>

+      <li>sessionScope - a Map that maps session-scoped attribute names 

+          to their values</li>

+      <li>applicationScope - a Map that maps application-scoped attribute 

+          names to their values</li>

+      <li>param - a Map that maps parameter names to a single String 

+          parameter value</li>

+      <li>paramValues - a Map that maps parameter names to a String[] of 

+          all values for that parameter</li>

+      <li>header - a Map that maps header names to a single String 

+          header value</li>

+      <li>headerValues - a Map that maps header names to a String[] of 

+          all values for that header</li>

+      <li>initParam - a Map that maps context initialization parameter 

+          names to their String parameter value</li>

+      <li>cookie - a Map that maps cookie names to a single Cookie object.</li>

+    </ul>

+

+    <blockquote>

+      <u><b>Change Parameter</b></u>

+      <form action="implicit-objects.jsp" method="GET">

+	  foo = <input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">

+          <input type="submit">

+      </form>

+      <br>

+      <code>

+        <table border="1">

+          <thead>

+	    <td><b>EL Expression</b></td>

+	    <td><b>Result</b></td>

+	  </thead>

+	  <tr>

+	    <td>\${param.foo}</td>

+	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${param["foo"]}</td>

+	    <td>${fn:escapeXml(param["foo"])}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${header["host"]}</td>

+	    <td>${fn:escapeXml(header["host"])}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${header["accept"]}</td>

+	    <td>${fn:escapeXml(header["accept"])}&nbsp;</td>

+	  </tr>

+	  <tr>

+	    <td>\${header["user-agent"]}</td>

+	    <td>${fn:escapeXml(header["user-agent"])}&nbsp;</td>

+	  </tr>

+	</table>

+      </code>

+    </blockquote>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp.html
new file mode 100644
index 0000000..a2d9bdc
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/el/implicit-objects.jsp.html
@@ -0,0 +1,91 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

+

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Expression Language - Implicit Objects&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Expression Language - Implicit Objects&lt;/h1>

+    &lt;hr>

+    This example illustrates some of the implicit objects available 

+    in the Expression Lanaguage.  The following implicit objects are 

+    available (not all illustrated here):

+    &lt;ul>

+      &lt;li>pageContext - the PageContext object&lt;/li>

+      &lt;li>pageScope - a Map that maps page-scoped attribute names to 

+          their values&lt;/li>

+      &lt;li>requestScope - a Map that maps request-scoped attribute names 

+          to their values&lt;/li>

+      &lt;li>sessionScope - a Map that maps session-scoped attribute names 

+          to their values&lt;/li>

+      &lt;li>applicationScope - a Map that maps application-scoped attribute 

+          names to their values&lt;/li>

+      &lt;li>param - a Map that maps parameter names to a single String 

+          parameter value&lt;/li>

+      &lt;li>paramValues - a Map that maps parameter names to a String[] of 

+          all values for that parameter&lt;/li>

+      &lt;li>header - a Map that maps header names to a single String 

+          header value&lt;/li>

+      &lt;li>headerValues - a Map that maps header names to a String[] of 

+          all values for that header&lt;/li>

+      &lt;li>initParam - a Map that maps context initialization parameter 

+          names to their String parameter value&lt;/li>

+      &lt;li>cookie - a Map that maps cookie names to a single Cookie object.&lt;/li>

+    &lt;/ul>

+

+    &lt;blockquote>

+      &lt;u>&lt;b>Change Parameter&lt;/b>&lt;/u>

+      &lt;form action="implicit-objects.jsp" method="GET">

+	  foo = &lt;input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">

+          &lt;input type="submit">

+      &lt;/form>

+      &lt;br>

+      &lt;code>

+        &lt;table border="1">

+          &lt;thead>

+	    &lt;td>&lt;b>EL Expression&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Result&lt;/b>&lt;/td>

+	  &lt;/thead>

+	  &lt;tr>

+	    &lt;td>\${param.foo}&lt;/td>

+	    &lt;td>${fn:escapeXml(param["foo"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${param["foo"]}&lt;/td>

+	    &lt;td>${fn:escapeXml(param["foo"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${header["host"]}&lt;/td>

+	    &lt;td>${fn:escapeXml(header["host"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${header["accept"]}&lt;/td>

+	    &lt;td>${fn:escapeXml(header["accept"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	  &lt;tr>

+	    &lt;td>\${header["user-agent"]}&lt;/td>

+	    &lt;td>${fn:escapeXml(header["user-agent"])}&amp;nbsp;&lt;/td>

+	  &lt;/tr>

+	&lt;/table>

+      &lt;/code>

+    &lt;/blockquote>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/FooBean.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/FooBean.java.html
new file mode 100644
index 0000000..0b15181
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/FooBean.java.html
@@ -0,0 +1,38 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples;

+

+public class FooBean {

+    private String bar;

+    

+    public FooBean() {

+        bar = "Initial value";

+    }

+    

+    public String getBar() {

+        return this.bar;

+    }

+    

+    public void setBar(String bar) {

+        this.bar = bar;

+    }

+    

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/HelloWorldSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/HelloWorldSimpleTag.java.html
new file mode 100644
index 0000000..c409839
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/HelloWorldSimpleTag.java.html
@@ -0,0 +1,34 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import java.io.IOException;

+

+/**

+ * SimpleTag handler that prints "Hello, world!"

+ */

+public class HelloWorldSimpleTag extends SimpleTagSupport {

+    public void doTag() throws JspException, IOException {

+	getJspContext().getOut().write( "Hello, world!" );

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/ShuffleSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/ShuffleSimpleTag.java.html
new file mode 100644
index 0000000..1b66d06
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/ShuffleSimpleTag.java.html
@@ -0,0 +1,83 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.JspFragment;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import java.io.IOException;

+

+/**

+ * SimpleTag handler that accepts takes three attributes of type

+ * JspFragment and invokes then in a random order.

+ */

+public class ShuffleSimpleTag extends SimpleTagSupport {

+    private JspFragment fragment1;

+    private JspFragment fragment2;

+    private JspFragment fragment3;

+

+    public void doTag() throws JspException, IOException {

+        switch( (int)(Math.random() * 6) ) {

+            case 0:

+                fragment1.invoke( null );

+                fragment2.invoke( null );

+                fragment3.invoke( null );

+                break;

+            case 1:

+                fragment1.invoke( null );

+                fragment3.invoke( null );

+                fragment2.invoke( null );

+                break;

+            case 2:

+                fragment2.invoke( null );

+                fragment1.invoke( null );

+                fragment3.invoke( null );

+                break;

+            case 3:

+                fragment2.invoke( null );

+                fragment3.invoke( null );

+                fragment1.invoke( null );

+                break;

+            case 4:

+                fragment3.invoke( null );

+                fragment1.invoke( null );

+                fragment2.invoke( null );

+                break;

+            case 5:

+                fragment3.invoke( null );

+                fragment2.invoke( null );

+                fragment1.invoke( null );

+                break;

+        }

+    }

+

+    public void setFragment1( JspFragment fragment1 ) {

+        this.fragment1 = fragment1;

+    }

+    

+    public void setFragment2( JspFragment fragment2 ) {

+        this.fragment2 = fragment2;

+    }

+    

+    public void setFragment3( JspFragment fragment3 ) {

+        this.fragment3 = fragment3;

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/TileSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/TileSimpleTag.java.html
new file mode 100644
index 0000000..4453222
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/TileSimpleTag.java.html
@@ -0,0 +1,48 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import java.io.IOException;

+

+/**

+ * Displays a tile as a single cell in a table.

+ */

+public class TileSimpleTag extends SimpleTagSupport {

+    private String color;

+    private String label;

+

+    public void doTag() throws JspException, IOException {

+	getJspContext().getOut().write( 

+	    "&lt;td width=\"32\" height=\"32\" bgcolor=\"" + this.color + 

+	    "\">&lt;font color=\"#ffffff\">&lt;center>" + this.label + 

+                "&lt;/center>&lt;/font>&lt;/td>" );

+    }

+

+    public void setColor( String color ) {

+        this.color = color;

+    }

+    

+    public void setLabel( String label ) {

+        this.label = label;

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.html
new file mode 100644
index 0000000..b949da9
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.html
@@ -0,0 +1,37 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="jspattribute.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="jspattribute.jsp.html">Source Code for jspattribute.jsp<font color="#0000FF"></a>

+  </font> </h3>

+

+<h3><a href="HelloWorldSimpleTag.java.html">Source Code for HelloWorldSimpleTag.java<font color="#0000FF"></a>

+  </font> </h3>

+

+<h3><a href="FooBean.java.html">Source Code for FooBean.java<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp
new file mode 100644
index 0000000..64b6d6e
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp
@@ -0,0 +1,46 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+<html>

+  <head>

+    <title>JSP 2.0 Examples - jsp:attribute and jsp:body</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - jsp:attribute and jsp:body</h1>

+    <hr>

+    <p>The new &lt;jsp:attribute&gt; and &lt;jsp:body&gt; 

+    standard actions can be used to specify the value of any standard

+    action or custom action attribute.</p>

+    <p>This example uses the &lt;jsp:attribute&gt;

+    standard action to use the output of a custom action invocation

+    (one that simply outputs "Hello, World!") to set the value of a

+    bean property.  This would normally require an intermediary

+    step, such as using JSTL's &lt;c:set&gt; action.</p>

+    <br>

+    <jsp:useBean id="foo" class="jsp2.examples.FooBean">

+      Bean created!  Setting foo.bar...<br>

+      <jsp:setProperty name="foo" property="bar">

+        <jsp:attribute name="value">

+	  <my:helloWorld/>

+        </jsp:attribute>

+      </jsp:setProperty>

+    </jsp:useBean>

+    <br>

+    Result: ${foo.bar}

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp.html
new file mode 100644
index 0000000..eb3a927
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp.html
@@ -0,0 +1,48 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - jsp:attribute and jsp:body&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - jsp:attribute and jsp:body&lt;/h1>

+    &lt;hr>

+    &lt;p>The new &amp;lt;jsp:attribute&amp;gt; and &amp;lt;jsp:body&amp;gt; 

+    standard actions can be used to specify the value of any standard

+    action or custom action attribute.&lt;/p>

+    &lt;p>This example uses the &amp;lt;jsp:attribute&amp;gt;

+    standard action to use the output of a custom action invocation

+    (one that simply outputs "Hello, World!") to set the value of a

+    bean property.  This would normally require an intermediary

+    step, such as using JSTL's &amp;lt;c:set&amp;gt; action.&lt;/p>

+    &lt;br>

+    &lt;jsp:useBean id="foo" class="jsp2.examples.FooBean">

+      Bean created!  Setting foo.bar...&lt;br>

+      &lt;jsp:setProperty name="foo" property="bar">

+        &lt;jsp:attribute name="value">

+	  &lt;my:helloWorld/>

+        &lt;/jsp:attribute>

+      &lt;/jsp:setProperty>

+    &lt;/jsp:useBean>

+    &lt;br>

+    Result: ${foo.bar}

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.html
new file mode 100644
index 0000000..b7a4cb6
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.html
@@ -0,0 +1,37 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="shuffle.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="shuffle.jsp.html">Source Code for shuffle.jsp<font color="#0000FF"></a>

+  </font> </h3>

+

+<h3><a href="ShuffleSimpleTag.java.html">Source Code for ShuffleSimpleTag.java<font color="#0000FF"></a>

+  </font> </h3>

+

+<h3><a href="TileSimpleTag.java.html">Source Code for TileSimpleTag.java<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp
new file mode 100644
index 0000000..2a318a7
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp
@@ -0,0 +1,90 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Shuffle Example</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Shuffle Example</h1>

+    <hr>

+    <p>Try reloading the page a few times.  Both the rows and the columns

+    are shuffled and appear different each time.</p>

+    <p>Here's how the code works.  The SimpleTag handler called 

+    &lt;my:shuffle&gt; accepts three attributes.  Each attribute is a 

+    JSP Fragment, meaning it is a fragment of JSP code that can be

+    dynamically executed by the shuffle tag handler on demand.  The 

+    shuffle tag handler executes the three fragments in a random order.

+    To shuffle both the rows and the columns, the shuffle tag is used

+    with itself as a parameter.</p>

+    <hr>

+    <blockquote>

+     <font color="#ffffff">

+      <table>

+        <my:shuffle>

+          <jsp:attribute name="fragment1">

+            <tr>

+              <my:shuffle>

+                <jsp:attribute name="fragment1">

+                  <my:tile color="#ff0000" label="A"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment2">

+                  <my:tile color="#00ff00" label="B"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment3">

+                  <my:tile color="#0000ff" label="C"/>

+                </jsp:attribute>

+              </my:shuffle>

+            </tr>

+          </jsp:attribute>

+          <jsp:attribute name="fragment2">

+            <tr>

+              <my:shuffle>

+                <jsp:attribute name="fragment1">

+                  <my:tile color="#ff0000" label="1"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment2">

+                  <my:tile color="#00ff00" label="2"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment3">

+                  <my:tile color="#0000ff" label="3"/>

+                </jsp:attribute>

+              </my:shuffle>

+            </tr>

+          </jsp:attribute>

+          <jsp:attribute name="fragment3">

+            <tr>

+              <my:shuffle>

+                <jsp:attribute name="fragment1">

+                  <my:tile color="#ff0000" label="!"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment2">

+                  <my:tile color="#00ff00" label="@"/>

+                </jsp:attribute>

+                <jsp:attribute name="fragment3">

+                  <my:tile color="#0000ff" label="#"/>

+                </jsp:attribute>

+              </my:shuffle>

+            </tr>

+          </jsp:attribute>

+        </my:shuffle>

+      </table>

+     </font>

+    </blockquote>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp.html
new file mode 100644
index 0000000..9329285
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp.html
@@ -0,0 +1,92 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Shuffle Example&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Shuffle Example&lt;/h1>

+    &lt;hr>

+    &lt;p>Try reloading the page a few times.  Both the rows and the columns

+    are shuffled and appear different each time.&lt;/p>

+    &lt;p>Here's how the code works.  The SimpleTag handler called 

+    &amp;lt;my:shuffle&amp;gt; accepts three attributes.  Each attribute is a 

+    JSP Fragment, meaning it is a fragment of JSP code that can be

+    dynamically executed by the shuffle tag handler on demand.  The 

+    shuffle tag handler executes the three fragments in a random order.

+    To shuffle both the rows and the columns, the shuffle tag is used

+    with itself as a parameter.&lt;/p>

+    &lt;hr>

+    &lt;blockquote>

+     &lt;font color="#ffffff">

+      &lt;table>

+        &lt;my:shuffle>

+          &lt;jsp:attribute name="fragment1">

+            &lt;tr>

+              &lt;my:shuffle>

+                &lt;jsp:attribute name="fragment1">

+                  &lt;my:tile color="#ff0000" label="A"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment2">

+                  &lt;my:tile color="#00ff00" label="B"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment3">

+                  &lt;my:tile color="#0000ff" label="C"/>

+                &lt;/jsp:attribute>

+              &lt;/my:shuffle>

+            &lt;/tr>

+          &lt;/jsp:attribute>

+          &lt;jsp:attribute name="fragment2">

+            &lt;tr>

+              &lt;my:shuffle>

+                &lt;jsp:attribute name="fragment1">

+                  &lt;my:tile color="#ff0000" label="1"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment2">

+                  &lt;my:tile color="#00ff00" label="2"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment3">

+                  &lt;my:tile color="#0000ff" label="3"/>

+                &lt;/jsp:attribute>

+              &lt;/my:shuffle>

+            &lt;/tr>

+          &lt;/jsp:attribute>

+          &lt;jsp:attribute name="fragment3">

+            &lt;tr>

+              &lt;my:shuffle>

+                &lt;jsp:attribute name="fragment1">

+                  &lt;my:tile color="#ff0000" label="!"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment2">

+                  &lt;my:tile color="#00ff00" label="@"/>

+                &lt;/jsp:attribute>

+                &lt;jsp:attribute name="fragment3">

+                  &lt;my:tile color="#0000ff" label="#"/>

+                &lt;/jsp:attribute>

+              &lt;/my:shuffle>

+            &lt;/tr>

+          &lt;/jsp:attribute>

+        &lt;/my:shuffle>

+      &lt;/table>

+     &lt;/font>

+    &lt;/blockquote>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.html
new file mode 100644
index 0000000..2e58dff
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.html
@@ -0,0 +1,31 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="basic.jspx"><img src="../../images/execute.gif" align="right" border="0"></a><a

+href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="basic.jspx.html">Source Code for XHTML Basic Example<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx
new file mode 100644
index 0000000..8a5b27d
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx
@@ -0,0 +1,46 @@
+<!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<tags:xhtmlbasic xmlns:tags="urn:jsptagdir:/WEB-INF/tags"

+                 xmlns:jsp="http://java.sun.com/JSP/Page"

+                 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"

+		 xmlns="http://www.w3.org/1999/xhtml">

+  <jsp:directive.page contentType="text/html" />

+  <head>

+    <title>JSPX - XHTML Basic Example</title>

+  </head>

+  <body>

+    <h1>JSPX - XHTML Basic Example</h1>

+    <hr/>

+    This example illustrates how to use JSPX to produce an XHTML basic

+    document suitable for use with mobile phones, televisions, 

+    PDAs, vending machines, pagers, car navigation systems,

+    mobile game machines, digital book readers, smart watches, etc.

+    <p/>

+    JSPX lets you create dynamic documents in a pure XML syntax compatible

+    with existing XML tools.  The XML syntax in JSP 1.2 was awkward and

+    required &amp;lt;jsp:root&amp;gt; to be the root element of the document.

+    This is no longer the case in JSP 2.0.

+    <p/>

+    This particular example uses a tag file to produce the DOCTYPE and

+    namespace declarations to make the output of this page a valid XHTML

+    Basic document.

+    <p/>

+    Just to prove this is live, here's some dynamic content:

+    <jsp:useBean id="now" class="java.util.Date" />

+    <fmt:formatDate value="${now}" pattern="MMMM d, yyyy, H:mm:ss"/>

+  </body>

+</tags:xhtmlbasic>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx.html
new file mode 100644
index 0000000..f177334
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/basic.jspx.html
@@ -0,0 +1,48 @@
+<html><body><pre>

+&lt;!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;tags:xhtmlbasic xmlns:tags="urn:jsptagdir:/WEB-INF/tags"

+                 xmlns:jsp="http://java.sun.com/JSP/Page"

+                 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"

+		 xmlns="http://www.w3.org/1999/xhtml">

+  &lt;jsp:directive.page contentType="text/html" />

+  &lt;head>

+    &lt;title>JSPX - XHTML Basic Example&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSPX - XHTML Basic Example&lt;/h1>

+    &lt;hr/>

+    This example illustrates how to use JSPX to produce an XHTML basic

+    document suitable for use with mobile phones, televisions, 

+    PDAs, vending machines, pagers, car navigation systems,

+    mobile game machines, digital book readers, smart watches, etc.

+    &lt;p/>

+    JSPX lets you create dynamic documents in a pure XML syntax compatible

+    with existing XML tools.  The XML syntax in JSP 1.2 was awkward and

+    required &amp;amp;lt;jsp:root&amp;amp;gt; to be the root element of the document.

+    This is no longer the case in JSP 2.0.

+    &lt;p/>

+    This particular example uses a tag file to produce the DOCTYPE and

+    namespace declarations to make the output of this page a valid XHTML

+    Basic document.

+    &lt;p/>

+    Just to prove this is live, here's some dynamic content:

+    &lt;jsp:useBean id="now" class="java.util.Date" />

+    &lt;fmt:formatDate value="${now}" pattern="MMMM d, yyyy, H:mm:ss"/>

+  &lt;/body>

+&lt;/tags:xhtmlbasic>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/svgexample.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/svgexample.html
new file mode 100644
index 0000000..12bcd82
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/svgexample.html
@@ -0,0 +1,52 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<html>

+  <head>

+    <title>JSP 2.0 SVG Example</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 SVG Example</h1>

+    <hr>

+    This example uses JSP 2.0's new, simplified JSPX syntax to render a

+    Scalable Vector Graphics (SVG) document.  When you view the source,

+    notice the lack of a &lt;jsp:root&gt; element!  The text to be rendered 

+    can be modified by changing the value of the name parameter.

+    <p>

+    SVG has many potential uses, such as searchable images, or images

+    customized with the name of your site's visitor (e.g. a "Susan's Store"

+    tab image).  JSPX is a natural fit for generating dynamic XML content

+    such as SVG.

+    <p>

+    To execute this example, follow these steps:

+    <ol>

+      <li>Download <a href="http://xmlgraphics.apache.org/batik/index.html">Apache Batik</a>,

+          or any other SVG viewer.</li>

+      <li>Copy the following URL:

+      <a href="http://localhost:8080/examples/jsp/jsp2/jspx/textRotate.jspx?name=JSPX">

+      http://localhost:8080/examples/jsp/jsp2/jspx/textRotate.jspx?name=JSPX</a>

+      </li>

+      <li>Paste the URL into Batik's Location field and press Enter</li>

+      <li>Customize by changing the name=JSPX parameter</li>

+    </ol>

+    <br>

+    The following is a screenshot of the resulting image, for those that

+    don't have an SVG viewer:

+    <blockquote>

+      <img src="textRotate.jpg" border="1">

+    </blockquote>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.html
new file mode 100644
index 0000000..e54588f
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.html
@@ -0,0 +1,32 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="textRotate.jspx"><img src="../../images/execute.gif" align="right" border="0"></a><a

+href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="textRotate.jspx.html">Source Code for SVG (Scalable Vector Graphics)

+Example<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jpg b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jpg
new file mode 100644
index 0000000..9e98736
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jpg
Binary files differ
diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx
new file mode 100644
index 0000000..ad97af2
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx
@@ -0,0 +1,52 @@
+<!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<!-- 

+  - This example is based off the textRotate.svg example that comes

+  - with Apache Batik.  The original example was written by Bill Haneman.

+  - This version by Mark Roth.

+  -->

+<svg xmlns="http://www.w3.org/2000/svg"

+     width="450" height="500" viewBox="0 0 450 500"

+     xmlns:c="http://java.sun.com/jsp/jstl/core"

+     xmlns:fn="http://java.sun.com/jsp/jstl/functions"

+     xmlns:jsp="http://java.sun.com/JSP/Page">

+  <jsp:directive.page contentType="image/svg+xml" />

+  <title>JSP 2.0 JSPX</title>

+  <!-- select name parameter, or default to JSPX -->

+  <c:set var="name" value='${empty fn:escapeXml(param["name"]) ? "JSPX" : fn:escapeXml(param["name"])}'/>

+  <g id="testContent">

+    <text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" >

+            JSP 2.0 XML Syntax (.jspx) Demo</text>

+    <text class="title" x="50%" y="15%" font-size="15" text-anchor="middle" >

+            Try changing the name parameter!</text>

+    <g opacity="1.0" transform="translate(225, 250)" id="rotatedText">

+      <c:forEach var="i" begin="1" end="24">

+        <jsp:text>

+          <![CDATA[<g opacity="0.95" transform="scale(1.05) rotate(15)">]]>

+        </jsp:text>

+        <text x="0" y="0" transform="scale(1.6, 1.6)" fill="DarkSlateBlue" 

+              text-anchor="middle" font-size="40" font-family="Serif" 

+              id="words">${name}</text>

+      </c:forEach>

+      <c:forEach var="i" begin="1" end="24">

+        <jsp:text><![CDATA[</g>]]></jsp:text>

+      </c:forEach>

+      <text style="font-size:75;font-family:Serif;fill:white" 

+            text-anchor="middle">${name}</text>

+    </g>

+  </g>

+</svg>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx.html b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx.html
new file mode 100644
index 0000000..5846a19
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/jspx/textRotate.jspx.html
@@ -0,0 +1,54 @@
+<html><body><pre>

+&lt;!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;!-- 

+  - This example is based off the textRotate.svg example that comes

+  - with Apache Batik.  The original example was written by Bill Haneman.

+  - This version by Mark Roth.

+  -->

+&lt;svg xmlns="http://www.w3.org/2000/svg"

+     width="450" height="500" viewBox="0 0 450 500"

+     xmlns:c="http://java.sun.com/jsp/jstl/core"

+     xmlns:fn="http://java.sun.com/jsp/jstl/functions"

+     xmlns:jsp="http://java.sun.com/JSP/Page">

+  &lt;jsp:directive.page contentType="image/svg+xml" />

+  &lt;title>JSP 2.0 JSPX&lt;/title>

+  &lt;!-- select name parameter, or default to JSPX -->

+  &lt;c:set var="name" value='${empty fn:escapeXml(param["name"]) ? "JSPX" : fn:escapeXml(param["name"])}'/>

+  &lt;g id="testContent">

+    &lt;text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" >

+            JSP 2.0 XML Syntax (.jspx) Demo&lt;/text>

+    &lt;text class="title" x="50%" y="15%" font-size="15" text-anchor="middle" >

+            Try changing the name parameter!&lt;/text>

+    &lt;g opacity="1.0" transform="translate(225, 250)" id="rotatedText">

+      &lt;c:forEach var="i" begin="1" end="24">

+        &lt;jsp:text>

+          &lt;![CDATA[&lt;g opacity="0.95" transform="scale(1.05) rotate(15)">]]>

+        &lt;/jsp:text>

+        &lt;text x="0" y="0" transform="scale(1.6, 1.6)" fill="DarkSlateBlue" 

+              text-anchor="middle" font-size="40" font-family="Serif" 

+              id="words">${name}&lt;/text>

+      &lt;/c:forEach>

+      &lt;c:forEach var="i" begin="1" end="24">

+        &lt;jsp:text>&lt;![CDATA[&lt;/g>]]>&lt;/jsp:text>

+      &lt;/c:forEach>

+      &lt;text style="font-size:75;font-family:Serif;fill:white" 

+            text-anchor="middle">${name}&lt;/text>

+    &lt;/g>

+  &lt;/g>

+&lt;/svg>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/EchoAttributesTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/EchoAttributesTag.java.html
new file mode 100644
index 0000000..4e62250
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/EchoAttributesTag.java.html
@@ -0,0 +1,56 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.JspWriter;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import javax.servlet.jsp.tagext.DynamicAttributes;

+import java.util.ArrayList;

+import java.io.IOException;

+

+/**

+ * SimpleTag handler that echoes all its attributes 

+ */

+public class EchoAttributesTag 

+    extends SimpleTagSupport

+    implements DynamicAttributes

+{

+    private ArrayList keys = new ArrayList();

+    private ArrayList values = new ArrayList();

+

+    public void doTag() throws JspException, IOException {

+	JspWriter out = getJspContext().getOut();

+	for( int i = 0; i &lt; keys.size(); i++ ) {

+	    String key = (String)keys.get( i );

+	    Object value = values.get( i );

+	    out.println( "&lt;li>" + key + " = " + value + "&lt;/li>" );

+        }

+    }

+

+    public void setDynamicAttribute( String uri, String localName, 

+	Object value ) 

+	throws JspException

+    {

+	keys.add( localName );

+	values.add( value );

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf b/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf
new file mode 100644
index 0000000..20de7f6
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf
@@ -0,0 +1,21 @@
+<!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<hr>

+<center>

+This banner included with &lt;include-coda&gt;

+</center>

+<hr>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf.html
new file mode 100644
index 0000000..ef5a1b3
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/coda.jspf.html
@@ -0,0 +1,23 @@
+<html><body><pre>

+&lt;!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;hr>

+&lt;center>

+This banner included with &amp;lt;include-coda&amp;gt;

+&lt;/center>

+&lt;hr>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.html
new file mode 100644
index 0000000..ebd2f4c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.html
@@ -0,0 +1,35 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="config.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="config.jsp.html">Source Code for config.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="prelude.jspf.html">Source Code for prelude.jspf<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="coda.jspf.html">Source Code for coda.jspf<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp
new file mode 100644
index 0000000..7ccf481
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp
@@ -0,0 +1,32 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+    <h1>JSP 2.0 Examples - JSP Configuration</h1>

+    <hr>

+    <p>Using a &lt;jsp-property-group&gt; element in the web.xml 

+    deployment descriptor, this JSP page has been configured in the

+    following ways:</p>

+    <ul>

+      <li>Uses &lt;include-prelude&gt; to include the top banner.</li>

+      <li>Uses &lt;include-coda&gt; to include the bottom banner.</li>

+      <li>Uses &lt;scripting-invalid&gt; true to disable 

+	  &lt;% scripting %&gt; elements</li>

+      <li>Uses &lt;el-ignored&gt; true to disable ${EL} elements</li>

+      <li>Uses &lt;page-encoding&gt; ISO-8859-1 to set the page encoding (though this is the default anyway)</li>

+    </ul>

+    There are various other configuration options that can be used.

+

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp.html
new file mode 100644
index 0000000..033f2d2
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/config.jsp.html
@@ -0,0 +1,34 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+    &lt;h1>JSP 2.0 Examples - JSP Configuration&lt;/h1>

+    &lt;hr>

+    &lt;p>Using a &amp;lt;jsp-property-group&amp;gt; element in the web.xml 

+    deployment descriptor, this JSP page has been configured in the

+    following ways:&lt;/p>

+    &lt;ul>

+      &lt;li>Uses &amp;lt;include-prelude&amp;gt; to include the top banner.&lt;/li>

+      &lt;li>Uses &amp;lt;include-coda&amp;gt; to include the bottom banner.&lt;/li>

+      &lt;li>Uses &amp;lt;scripting-invalid&amp;gt; true to disable 

+	  &amp;lt;% scripting %&amp;gt; elements&lt;/li>

+      &lt;li>Uses &amp;lt;el-ignored&amp;gt; true to disable ${EL} elements&lt;/li>

+      &lt;li>Uses &amp;lt;page-encoding&amp;gt; ISO-8859-1 to set the page encoding (though this is the default anyway)&lt;/li>

+    &lt;/ul>

+    There are various other configuration options that can be used.

+

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.html
new file mode 100644
index 0000000..a02a987
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="dynamicattrs.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="dynamicattrs.jsp.html">Source Code for dynamicattrs.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="EchoAttributesTag.java.html">Source Code for EchoAttributesTag.java<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp
new file mode 100644
index 0000000..637dea9
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp
@@ -0,0 +1,44 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Dynamic Attributes</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Dynamic Attributes</h1>

+    <hr>

+    <p>This JSP page invokes a custom tag that accepts a dynamic set 

+    of attributes.  The tag echoes the name and value of all attributes

+    passed to it.</p>

+    <hr>

+    <h2>Invocation 1 (six attributes)</h2>

+    <ul>

+      <my:echoAttributes x="1" y="2" z="3" r="red" g="green" b="blue"/>

+    </ul>

+    <h2>Invocation 2 (zero attributes)</h2>

+    <ul>

+      <my:echoAttributes/>

+    </ul>

+    <h2>Invocation 3 (three attributes)</h2>

+    <ul>

+      <my:echoAttributes dogName="Scruffy" 

+	   		 catName="Fluffy" 

+			 blowfishName="Puffy"/>

+    </ul>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp.html
new file mode 100644
index 0000000..ec47c8c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp.html
@@ -0,0 +1,46 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Dynamic Attributes&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Dynamic Attributes&lt;/h1>

+    &lt;hr>

+    &lt;p>This JSP page invokes a custom tag that accepts a dynamic set 

+    of attributes.  The tag echoes the name and value of all attributes

+    passed to it.&lt;/p>

+    &lt;hr>

+    &lt;h2>Invocation 1 (six attributes)&lt;/h2>

+    &lt;ul>

+      &lt;my:echoAttributes x="1" y="2" z="3" r="red" g="green" b="blue"/>

+    &lt;/ul>

+    &lt;h2>Invocation 2 (zero attributes)&lt;/h2>

+    &lt;ul>

+      &lt;my:echoAttributes/>

+    &lt;/ul>

+    &lt;h2>Invocation 3 (three attributes)&lt;/h2>

+    &lt;ul>

+      &lt;my:echoAttributes dogName="Scruffy" 

+	   		 catName="Fluffy" 

+			 blowfishName="Puffy"/>

+    &lt;/ul>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf b/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf
new file mode 100644
index 0000000..9772e1c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf
@@ -0,0 +1,21 @@
+<!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<hr>

+<center>

+This banner included with &lt;include-prelude&gt;

+</center>

+<hr>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf.html b/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf.html
new file mode 100644
index 0000000..f928f18
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/misc/prelude.jspf.html
@@ -0,0 +1,23 @@
+<html><body><pre>

+&lt;!--

+  Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;hr>

+&lt;center>

+This banner included with &amp;lt;include-prelude&amp;gt;

+&lt;/center>

+&lt;hr>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/BookBean.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/BookBean.java.html
new file mode 100644
index 0000000..a977a8c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/BookBean.java.html
@@ -0,0 +1,46 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples;

+

+public class BookBean {

+    private String title;

+    private String author;

+    private String isbn;

+    

+    public BookBean( String title, String author, String isbn ) {

+        this.title = title;

+        this.author = author;

+        this.isbn = isbn;

+    }

+

+    public String getTitle() {

+        return this.title;

+    }

+    

+    public String getAuthor() {

+        return this.author;

+    }

+    

+    public String getIsbn() {

+        return this.isbn;

+    }

+    

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/FindBookSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/FindBookSimpleTag.java.html
new file mode 100644
index 0000000..d010f0a
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/FindBookSimpleTag.java.html
@@ -0,0 +1,46 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import jsp2.examples.BookBean;

+

+/**

+ * SimpleTag handler that pretends to search for a book, and stores

+ * the result in a scoped variable.

+ */

+public class FindBookSimpleTag extends SimpleTagSupport {

+    private String var;

+    

+    private static final String BOOK_TITLE = "The Lord of the Rings";

+    private static final String BOOK_AUTHOR = "J. R. R. Tolkein";

+    private static final String BOOK_ISBN = "0618002251";

+

+    public void doTag() throws JspException {

+        BookBean book = new BookBean( BOOK_TITLE, BOOK_AUTHOR, BOOK_ISBN );

+        getJspContext().setAttribute( this.var, book );

+    }

+

+    public void setVar( String var ) {

+	this.var = var;

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/Functions.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/Functions.java.html
new file mode 100644
index 0000000..350fce6
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/Functions.java.html
@@ -0,0 +1,45 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+package jsp2.examples.el;

+

+/**

+ * Defines the functions for the jsp2 example tag library.

+ * 

+ * &lt;p>Each function is defined as a static method.&lt;/p>

+ */

+public class Functions {

+    public static String reverse( String text ) {

+        return new StringBuffer( text ).reverse().toString();

+    }

+

+    public static int numVowels( String text ) {

+        String vowels = "aeiouAEIOU";

+	int result = 0;

+        for( int i = 0; i &lt; text.length(); i++ ) {

+	    if( vowels.indexOf( text.charAt( i ) ) != -1 ) {

+	        result++;

+	    }

+	}

+	return result;

+    }

+

+    public static String caps( String text ) {

+        return text.toUpperCase();

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/HelloWorldSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/HelloWorldSimpleTag.java.html
new file mode 100644
index 0000000..c409839
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/HelloWorldSimpleTag.java.html
@@ -0,0 +1,34 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import java.io.IOException;

+

+/**

+ * SimpleTag handler that prints "Hello, world!"

+ */

+public class HelloWorldSimpleTag extends SimpleTagSupport {

+    public void doTag() throws JspException, IOException {

+	getJspContext().getOut().write( "Hello, world!" );

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/RepeatSimpleTag.java.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/RepeatSimpleTag.java.html
new file mode 100644
index 0000000..2ad96eb
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/RepeatSimpleTag.java.html
@@ -0,0 +1,44 @@
+<html><body><pre>

+/*

+* Licensed to the Apache Software Foundation (ASF) under one or more

+* contributor license agreements.  See the NOTICE file distributed with

+* this work for additional information regarding copyright ownership.

+* The ASF licenses this file to You under the Apache License, Version 2.0

+* (the "License"); you may not use this file except in compliance with

+* the License.  You may obtain a copy of the License at

+*

+*     http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/

+

+

+package jsp2.examples.simpletag;

+

+import javax.servlet.jsp.JspException;

+import javax.servlet.jsp.tagext.SimpleTagSupport;

+import java.io.IOException;

+

+/**

+ * SimpleTag handler that accepts a num attribute and 

+ * invokes its body 'num' times.

+ */

+public class RepeatSimpleTag extends SimpleTagSupport {

+    private int num;

+

+    public void doTag() throws JspException, IOException {

+        for (int i=0; i&lt;num; i++) {

+            getJspContext().setAttribute("count", String.valueOf( i + 1 ) );

+	    getJspBody().invoke(null);

+        }

+    }

+

+    public void setNum(int num) {

+	this.num = num;

+    }

+}

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.html
new file mode 100644
index 0000000..62cf284
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.html
@@ -0,0 +1,37 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="book.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="book.jsp.html">Source Code for the Book Example JSP<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="FindBookSimpleTag.java.html">Source Code for the FindBook SimpleTag Handler<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="BookBean.java.html">Source Code for BookBean<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="Functions.java.html">Source Code for the EL Functions<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp
new file mode 100644
index 0000000..7a9a064
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp
@@ -0,0 +1,55 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="my" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Book SimpleTag Handler</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Book SimpleTag Handler</h1>

+    <hr>

+    <p>Illustrates a semi-realistic use of SimpleTag and the Expression 

+    Language.  First, a &lt;my:findBook&gt; tag is invoked to populate 

+    the page context with a BookBean.  Then, the books fields are printed 

+    in all caps.</p>

+    <br>

+    <b><u>Result:</u></b><br>

+    <my:findBook var="book"/>

+    <table border="1">

+        <thead>

+	    <td><b>Field</b></td>

+	    <td><b>Value</b></td>

+	    <td><b>Capitalized</b></td>

+	</thead>

+	<tr>

+	    <td>Title</td>

+	    <td>${book.title}</td>

+	    <td>${my:caps(book.title)}</td>

+	</tr>

+	<tr>

+	    <td>Author</td>

+	    <td>${book.author}</td>

+	    <td>${my:caps(book.author)}</td>

+	</tr>

+	<tr>

+	    <td>ISBN</td>

+	    <td>${book.isbn}</td>

+	    <td>${my:caps(book.isbn)}</td>

+	</tr>

+    </table>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp.html
new file mode 100644
index 0000000..7ecfe3b
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/book.jsp.html
@@ -0,0 +1,57 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="my" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Book SimpleTag Handler&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Book SimpleTag Handler&lt;/h1>

+    &lt;hr>

+    &lt;p>Illustrates a semi-realistic use of SimpleTag and the Expression 

+    Language.  First, a &amp;lt;my:findBook&amp;gt; tag is invoked to populate 

+    the page context with a BookBean.  Then, the books fields are printed 

+    in all caps.&lt;/p>

+    &lt;br>

+    &lt;b>&lt;u>Result:&lt;/u>&lt;/b>&lt;br>

+    &lt;my:findBook var="book"/>

+    &lt;table border="1">

+        &lt;thead>

+	    &lt;td>&lt;b>Field&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Value&lt;/b>&lt;/td>

+	    &lt;td>&lt;b>Capitalized&lt;/b>&lt;/td>

+	&lt;/thead>

+	&lt;tr>

+	    &lt;td>Title&lt;/td>

+	    &lt;td>${book.title}&lt;/td>

+	    &lt;td>${my:caps(book.title)}&lt;/td>

+	&lt;/tr>

+	&lt;tr>

+	    &lt;td>Author&lt;/td>

+	    &lt;td>${book.author}&lt;/td>

+	    &lt;td>${my:caps(book.author)}&lt;/td>

+	&lt;/tr>

+	&lt;tr>

+	    &lt;td>ISBN&lt;/td>

+	    &lt;td>${book.isbn}&lt;/td>

+	    &lt;td>${my:caps(book.isbn)}&lt;/td>

+	&lt;/tr>

+    &lt;/table>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.html
new file mode 100644
index 0000000..1e7dfcb
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="hello.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="hello.jsp.html">Source Code for the Hello World Tag Example JSP<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="HelloWorldSimpleTag.java.html">Source Code for the Hello World SimpleTag Handler<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp
new file mode 100644
index 0000000..4222b2e
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp
@@ -0,0 +1,31 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Hello World SimpleTag Handler</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Hello World SimpleTag Handler</h1>

+    <hr>

+    <p>This tag handler simply echos "Hello, World!"  It's an example of

+    a very basic SimpleTag handler with no body.</p>

+    <br>

+    <b><u>Result:</u></b>

+    <mytag:helloWorld/>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp.html
new file mode 100644
index 0000000..c363802
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/hello.jsp.html
@@ -0,0 +1,33 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Hello World SimpleTag Handler&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Hello World SimpleTag Handler&lt;/h1>

+    &lt;hr>

+    &lt;p>This tag handler simply echos "Hello, World!"  It's an example of

+    a very basic SimpleTag handler with no body.&lt;/p>

+    &lt;br>

+    &lt;b>&lt;u>Result:&lt;/u>&lt;/b>

+    &lt;mytag:helloWorld/>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.html
new file mode 100644
index 0000000..18ff5ed
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="repeat.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="repeat.jsp.html">Source Code for the Repeat Tag Example JSP<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="RepeatSimpleTag.java.html">Source Code for the Repeat SimpleTag Handler<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp
new file mode 100644
index 0000000..1f3d008
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp
@@ -0,0 +1,39 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Repeat SimpleTag Handler</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Repeat SimpleTag Handler</h1>

+    <hr>

+    <p>This tag handler accepts a "num" parameter and repeats the body of the

+    tag "num" times.  It's a simple example, but the implementation of 

+    such a tag in JSP 2.0 is substantially simpler than the equivalent 

+    JSP 1.2-style classic tag handler.</p>

+    <p>The body of the tag is encapsulated in a "JSP Fragment" and passed

+    to the tag handler, which then executes it five times, inside a 

+    for loop.  The tag handler passes in the current invocation in a

+    scoped variable called count, which can be accessed using the EL.</p>

+    <br>

+    <b><u>Result:</u></b><br>

+    <mytag:repeat num="5">

+      Invocation ${count} of 5<br>

+    </mytag:repeat>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp.html
new file mode 100644
index 0000000..e36b66c
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/simpletag/repeat.jsp.html
@@ -0,0 +1,41 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="mytag" uri="/WEB-INF/jsp2/jsp2-example-taglib.tld" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Repeat SimpleTag Handler&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Repeat SimpleTag Handler&lt;/h1>

+    &lt;hr>

+    &lt;p>This tag handler accepts a "num" parameter and repeats the body of the

+    tag "num" times.  It's a simple example, but the implementation of 

+    such a tag in JSP 2.0 is substantially simpler than the equivalent 

+    JSP 1.2-style classic tag handler.&lt;/p>

+    &lt;p>The body of the tag is encapsulated in a "JSP Fragment" and passed

+    to the tag handler, which then executes it five times, inside a 

+    for loop.  The tag handler passes in the current invocation in a

+    scoped variable called count, which can be accessed using the EL.&lt;/p>

+    &lt;br>

+    &lt;b>&lt;u>Result:&lt;/u>&lt;/b>&lt;br>

+    &lt;mytag:repeat num="5">

+      Invocation ${count} of 5&lt;br>

+    &lt;/mytag:repeat>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/displayProducts.tag.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/displayProducts.tag.html
new file mode 100644
index 0000000..6388336
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/displayProducts.tag.html
@@ -0,0 +1,57 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

+&lt;%@ attribute name="normalPrice" fragment="true" %>

+&lt;%@ attribute name="onSale" fragment="true" %>

+&lt;%@ variable name-given="name" %>

+&lt;%@ variable name-given="price" %>

+&lt;%@ variable name-given="origPrice" %>

+&lt;%@ variable name-given="salePrice" %>

+

+&lt;table border="1">

+  &lt;tr>

+    &lt;td> 

+      &lt;c:set var="name" value="Hand-held Color PDA"/>

+      &lt;c:set var="price" value="$298.86"/>

+      &lt;jsp:invoke fragment="normalPrice"/>

+    &lt;/td>

+    &lt;td> 

+      &lt;c:set var="name" value="4-Pack 150 Watt Light Bulbs"/>

+      &lt;c:set var="origPrice" value="$2.98"/>

+      &lt;c:set var="salePrice" value="$2.32"/>

+      &lt;jsp:invoke fragment="onSale"/>

+    &lt;/td>

+    &lt;td> 

+      &lt;c:set var="name" value="Digital Cellular Phone"/>

+      &lt;c:set var="price" value="$68.74"/>

+      &lt;jsp:invoke fragment="normalPrice"/>

+    &lt;/td>

+    &lt;td> 

+      &lt;c:set var="name" value="Baby Grand Piano"/>

+      &lt;c:set var="price" value="$10,800.00"/>

+      &lt;jsp:invoke fragment="normalPrice"/>

+    &lt;/td>

+    &lt;td> 

+      &lt;c:set var="name" value="Luxury Car w/ Leather Seats"/>

+      &lt;c:set var="origPrice" value="$23,980.00"/>

+      &lt;c:set var="salePrice" value="$21,070.00"/>

+      &lt;jsp:invoke fragment="onSale"/>

+    &lt;/td>

+  &lt;/tr>

+&lt;/table>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.html
new file mode 100644
index 0000000..aab12a7
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="hello.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="hello.jsp.html">Source Code for hello.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="helloWorld.tag.html">Source Code for helloWorld.tag<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp
new file mode 100644
index 0000000..e93c7c5
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp
@@ -0,0 +1,35 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Hello World Using a Tag File</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Hello World Using a Tag File</h1>

+    <hr>

+    <p>This JSP page invokes a custom tag that simply echos "Hello, World!"  

+    The custom tag is generated from a tag file in the /WEB-INF/tags

+    directory.</p>

+    <p>Notice that we did not need to write a TLD for this tag.  We just

+    created /WEB-INF/tags/helloWorld.tag, imported it using the taglib

+    directive, and used it!</p>

+    <br>

+    <b><u>Result:</u></b>

+    <tags:helloWorld/>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp.html
new file mode 100644
index 0000000..c3b7b4f
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/hello.jsp.html
@@ -0,0 +1,37 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Hello World Using a Tag File&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Hello World Using a Tag File&lt;/h1>

+    &lt;hr>

+    &lt;p>This JSP page invokes a custom tag that simply echos "Hello, World!"  

+    The custom tag is generated from a tag file in the /WEB-INF/tags

+    directory.&lt;/p>

+    &lt;p>Notice that we did not need to write a TLD for this tag.  We just

+    created /WEB-INF/tags/helloWorld.tag, imported it using the taglib

+    directive, and used it!&lt;/p>

+    &lt;br>

+    &lt;b>&lt;u>Result:&lt;/u>&lt;/b>

+    &lt;tags:helloWorld/>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/helloWorld.tag.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/helloWorld.tag.html
new file mode 100644
index 0000000..e335986
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/helloWorld.tag.html
@@ -0,0 +1,19 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+Hello, world!

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.html
new file mode 100644
index 0000000..161b70d
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="panel.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="panel.jsp.html">Source Code for panel.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="panel.tag.html">Source Code for panel.tag<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp
new file mode 100644
index 0000000..4dfc483
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp
@@ -0,0 +1,58 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Panels using Tag Files</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Panels using Tag Files</h1>

+    <hr>

+    <p>This JSP page invokes a custom tag that draws a 

+    panel around the contents of the tag body.  Normally, such a tag 

+    implementation would require a Java class with many println() statements,

+    outputting HTML.  Instead, we can use a .tag file as a template,

+    and we don't need to write a single line of Java or even a TLD!</p>

+    <hr>

+    <table border="0">

+      <tr valign="top">

+        <td>

+          <tags:panel color="#ff8080" bgcolor="#ffc0c0" title="Panel 1">

+	    First panel.<br/>

+	  </tags:panel>

+        </td>

+        <td>

+          <tags:panel color="#80ff80" bgcolor="#c0ffc0" title="Panel 2">

+	    Second panel.<br/>

+	    Second panel.<br/>

+	    Second panel.<br/>

+	    Second panel.<br/>

+	  </tags:panel>

+        </td>

+        <td>

+          <tags:panel color="#8080ff" bgcolor="#c0c0ff" title="Panel 3">

+	    Third panel.<br/>

+            <tags:panel color="#ff80ff" bgcolor="#ffc0ff" title="Inner">

+	      A panel in a panel.

+	    </tags:panel>

+	    Third panel.<br/>

+	  </tags:panel>

+        </td>

+      </tr>

+    </table>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp.html
new file mode 100644
index 0000000..0cc746d
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.jsp.html
@@ -0,0 +1,60 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Panels using Tag Files&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Panels using Tag Files&lt;/h1>

+    &lt;hr>

+    &lt;p>This JSP page invokes a custom tag that draws a 

+    panel around the contents of the tag body.  Normally, such a tag 

+    implementation would require a Java class with many println() statements,

+    outputting HTML.  Instead, we can use a .tag file as a template,

+    and we don't need to write a single line of Java or even a TLD!&lt;/p>

+    &lt;hr>

+    &lt;table border="0">

+      &lt;tr valign="top">

+        &lt;td>

+          &lt;tags:panel color="#ff8080" bgcolor="#ffc0c0" title="Panel 1">

+	    First panel.&lt;br/>

+	  &lt;/tags:panel>

+        &lt;/td>

+        &lt;td>

+          &lt;tags:panel color="#80ff80" bgcolor="#c0ffc0" title="Panel 2">

+	    Second panel.&lt;br/>

+	    Second panel.&lt;br/>

+	    Second panel.&lt;br/>

+	    Second panel.&lt;br/>

+	  &lt;/tags:panel>

+        &lt;/td>

+        &lt;td>

+          &lt;tags:panel color="#8080ff" bgcolor="#c0c0ff" title="Panel 3">

+	    Third panel.&lt;br/>

+            &lt;tags:panel color="#ff80ff" bgcolor="#ffc0ff" title="Inner">

+	      A panel in a panel.

+	    &lt;/tags:panel>

+	    Third panel.&lt;br/>

+	  &lt;/tags:panel>

+        &lt;/td>

+      &lt;/tr>

+    &lt;/table>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.tag.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.tag.html
new file mode 100644
index 0000000..df1c214
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/panel.tag.html
@@ -0,0 +1,31 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ attribute name="color" %>

+&lt;%@ attribute name="bgcolor" %>

+&lt;%@ attribute name="title" %>

+&lt;table border="1" bgcolor="${color}">

+  &lt;tr>

+    &lt;td>&lt;b>${title}&lt;/b>&lt;/td>

+  &lt;/tr>

+  &lt;tr>

+    &lt;td bgcolor="${bgcolor}">

+      &lt;jsp:doBody/>

+    &lt;/td>

+  &lt;/tr>

+&lt;/table>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.html
new file mode 100644
index 0000000..e4780b9
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.html
@@ -0,0 +1,33 @@
+<html>

+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<head>

+<title>View Source Code</title>

+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

+</head>

+

+<body bgcolor="#FFFFFF">

+<p><font color="#0000FF"><a href="products.jsp"><img src="../../images/execute.gif" align="right" border="0"></a>

+<a href="../../index.html"><img src="../../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>

+

+<h3><a href="products.jsp.html">Source Code for products.jsp<font color="#0000FF"></a>

+  </font> </h3>

+<h3><a href="displayProducts.tag.html">Source Code for displayProducts.tag<font color="#0000FF"></a>

+  </font> </h3>

+

+</body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp
new file mode 100644
index 0000000..328cc96
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp
@@ -0,0 +1,54 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+<html>

+  <head>

+    <title>JSP 2.0 Examples - Display Products Tag File</title>

+  </head>

+  <body>

+    <h1>JSP 2.0 Examples - Display Products Tag File</h1>

+    <hr>

+    <p>This JSP page invokes a tag file that displays a listing of 

+    products.  The custom tag accepts two fragments that enable

+    customization of appearance.  One for when the product is on sale

+    and one for normal price.</p>

+    <p>The tag is invoked twice, using different styles</p>

+    <hr>

+    <h2>Products</h2>

+    <tags:displayProducts>

+      <jsp:attribute name="normalPrice">

+	Item: ${name}<br/>

+	Price: ${price}

+      </jsp:attribute>

+      <jsp:attribute name="onSale">

+	Item: ${name}<br/>

+	<font color="red"><strike>Was: ${origPrice}</strike></font><br/>

+	<b>Now: ${salePrice}</b>

+      </jsp:attribute>

+    </tags:displayProducts>

+    <hr>

+    <h2>Products (Same tag, alternate style)</h2>

+    <tags:displayProducts>

+      <jsp:attribute name="normalPrice">

+	<b>${name}</b> @ ${price} ea.

+      </jsp:attribute>

+      <jsp:attribute name="onSale">

+	<b>${name}</b> @ ${salePrice} ea. (was: ${origPrice})

+      </jsp:attribute>

+    </tags:displayProducts>

+  </body>

+</html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp.html
new file mode 100644
index 0000000..f9b6e6f
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/products.jsp.html
@@ -0,0 +1,56 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>

+&lt;html>

+  &lt;head>

+    &lt;title>JSP 2.0 Examples - Display Products Tag File&lt;/title>

+  &lt;/head>

+  &lt;body>

+    &lt;h1>JSP 2.0 Examples - Display Products Tag File&lt;/h1>

+    &lt;hr>

+    &lt;p>This JSP page invokes a tag file that displays a listing of 

+    products.  The custom tag accepts two fragments that enable

+    customization of appearance.  One for when the product is on sale

+    and one for normal price.&lt;/p>

+    &lt;p>The tag is invoked twice, using different styles&lt;/p>

+    &lt;hr>

+    &lt;h2>Products&lt;/h2>

+    &lt;tags:displayProducts>

+      &lt;jsp:attribute name="normalPrice">

+	Item: ${name}&lt;br/>

+	Price: ${price}

+      &lt;/jsp:attribute>

+      &lt;jsp:attribute name="onSale">

+	Item: ${name}&lt;br/>

+	&lt;font color="red">&lt;strike>Was: ${origPrice}&lt;/strike>&lt;/font>&lt;br/>

+	&lt;b>Now: ${salePrice}&lt;/b>

+      &lt;/jsp:attribute>

+    &lt;/tags:displayProducts>

+    &lt;hr>

+    &lt;h2>Products (Same tag, alternate style)&lt;/h2>

+    &lt;tags:displayProducts>

+      &lt;jsp:attribute name="normalPrice">

+	&lt;b>${name}&lt;/b> @ ${price} ea.

+      &lt;/jsp:attribute>

+      &lt;jsp:attribute name="onSale">

+	&lt;b>${name}&lt;/b> @ ${salePrice} ea. (was: ${origPrice})

+      &lt;/jsp:attribute>

+    &lt;/tags:displayProducts>

+  &lt;/body>

+&lt;/html>

+</pre></body></html>

diff --git a/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/xhtmlbasic.tag.html b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/xhtmlbasic.tag.html
new file mode 100644
index 0000000..a8bd497
--- /dev/null
+++ b/tomcat-uid/webapps/examples/jsp/jsp2/tagfiles/xhtmlbasic.tag.html
@@ -0,0 +1,23 @@
+<html><body><pre>

+&lt;!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+  contributor license agreements.  See the NOTICE file distributed with

+  this work for additional information regarding copyright ownership.

+  The ASF licenses this file to You under the Apache License, Version 2.0

+  (the "License"); you may not use this file except in compliance with

+  the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+  Unless required by applicable law or agreed to in writing, software

+  distributed under the License is distributed on an "AS IS" BASIS,

+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+  See the License for the specific language governing permissions and

+  limitations under the License.

+-->

+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"

+"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">

+&lt;html xmlns="http://www.w3.org/1999/xhtml">

+&lt;jsp:doBody/>

+&lt;/html>

+</pre></body></html>