Hi everybody,

this is my first post to this group, even if I lurked for a while.
Now I think I can contribute a litte bit ;)

I noticed, that the JSP examples in TC4 (current CVS) do work, but the
source code is not shown propperly. At least, most of it (via Source /
Source Code for ...)

I reworked the examples a little bit to consistently use source.jsp and
therefor the examples-taglib. I did not change the logic, or added
additional links. Just changed the lines in the show Source HTML files from

<h3><a href="date.txt">Source Code for Date Example<font
color="#0000FF"></a>
  </font> </h3>

to something like

<h3><a href="/examples/jsp/source.jsp?/jsp/dates/date.jsp">Source Code for
Date Example<font color="#0000FF"></a>
  </font> </h3>

and changed a link in index.html form "colors/cresult.html" to
"checkbox/cresult.html" in the checkbox example.

As a side effect most of the *.txt files are not required anymore (e.g.
date.txt)


I attatch a zip file containing all files in the webapp\examples\jsp
directory and a patchfile, which I created in WinCVS using diff -u in the
jsp directory.

I hope this is in the right format, since I have never done this diff/path
thingy before.
[EMAIL PROTECTED]@jakarta.apache.orgtomcat-dev@jakarta
[EMAIL PROTECTED]

Feel free to incorporate this into TC4 and let me know, if it was useful.
Perhaps we can use something for TC3? (havent looked at those examples)


Best Regards, and keep up the excelent work,
Hans

-----------
Hans Schmid

jsp.zip


cvs diff -u (in directory 
D:\Develop\jakarta-cvs\jakarta-tomcat-4.0\webapps\examples\jsp)
cvs server: Diffing .
Index: index.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/index.html,v
retrieving revision 1.1
diff -u -r1.1 index.html
--- index.html  2000/08/17 00:58:03     1.1
+++ index.html  2000/11/23 14:55:51
@@ -6,7 +6,7 @@
    <meta name="Author" content="Anil K. Vijendran">
    <title>JSP Examples</title>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 </head>
@@ -90,7 +90,7 @@
 
 <td VALIGN=TOP WIDTH="30%"><a href="/checkbox/check.html"><img 
SRC="../images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a 
href="checkbox/check.html">Execute</a></td>
 
-<td WIDTH="30%"><a href="colors/cresult.html"><img SRC="../images/code.gif" HSPACE=4 
BORDER=0 height=24 width=24 align=TOP></a><a 
href="checkbox/cresult.html">Source</a></td>
+<td WIDTH="30%"><a href="checkbox/cresult.html"><img SRC="../images/code.gif" 
+HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a 
+href="checkbox/cresult.html">Source</a></td>
 </tr>
 
 <tr VALIGN=TOP>
cvs server: Diffing cal
cvs server: cannot find cal/cal1.txt
cvs server: cannot find cal/cal2.txt
Index: cal/calendar.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/cal/calendar.html,v
retrieving revision 1.1
diff -u -r1.1 calendar.html
--- cal/calendar.html   2000/08/17 00:58:04     1.1
+++ cal/calendar.html   2000/11/23 14:55:53
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -13,9 +13,9 @@
 <p><font color="#0000FF"><a href="login.html"><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>
 
 <h2> Source Code for Calendar Example. <br>
-<h3><a href="cal1.txt">cal1.jsp<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/cal/cal1.jsp">cal1.jsp<font 
+color="#0000FF"></a>
   </font> </h3>
-<h3><a href="cal2.txt">cal2.jsp<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/cal/cal2.jsp">cal2.jsp<font 
+color="#0000FF"></a>
   </font> </h3>
 
 <br>
cvs server: Diffing checkbox
cvs server: cannot find checkbox/checkresult.txt
Index: checkbox/cresult.html
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/checkbox/cresult.html,v
retrieving revision 1.1
diff -u -r1.1 cresult.html
--- checkbox/cresult.html       2000/08/17 00:58:07     1.1
+++ checkbox/cresult.html       2000/11/23 14:55:55
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="check.html"><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="checkresult.txt">Source Code for Checkbox Example<font 
color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/checkbox/checkresult.jsp">Source Code for 
+Checkbox Example<font color="#0000FF"></a>
   </font> </h3>
 
 <h3><a href="CheckTest.html">Property Sheet for CheckTest
cvs server: Diffing colors
Index: colors/clr.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/colors/clr.html,v
retrieving revision 1.1
diff -u -r1.1 clr.html
--- colors/clr.html     2000/08/17 00:58:09     1.1
+++ colors/clr.html     2000/11/23 14:55:58
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="colors.html"><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="colors.txt">Source Code for Color Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/colors/colrs.jsp">Source Code for Color 
+Example<font color="#0000FF"></a>
   </font> </h3>
 
 <h3><a href="ColorGameBean.html">Property Sheet for ColorGameBean
cvs server: cannot find colors/colors.txt
cvs server: Diffing dates
Index: dates/date.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/dates/date.html,v
retrieving revision 1.1
diff -u -r1.1 date.html
--- dates/date.html     2000/08/17 00:58:09     1.1
+++ dates/date.html     2000/11/23 14:55:59
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="date.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="date.txt">Source Code for Date Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/dates/date.jsp">Source Code for Date 
+Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find dates/date.txt
cvs server: Diffing error
Index: error/er.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/error/er.html,v
retrieving revision 1.1
diff -u -r1.1 er.html
--- error/er.html       2000/08/17 00:58:10     1.1
+++ error/er.html       2000/11/23 14:56:02
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="error.html"><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="err.txt">Source Code for Error Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/error/err.jsp">Source Code for Error 
+Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find error/err.txt
cvs server: Diffing forward
cvs server: cannot find forward/forward.txt
Index: forward/fwd.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/forward/fwd.html,v
retrieving revision 1.1
diff -u -r1.1 fwd.html
--- forward/fwd.html    2000/10/16 21:33:11     1.1
+++ forward/fwd.html    2000/11/23 14:56:04
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 <head>
@@ -11,7 +11,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="forward.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="forward.txt">Source Code for Forward Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/forward/forward.jsp">Source Code for 
+Forward Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: Diffing include
Index: include/inc.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/include/inc.html,v
retrieving revision 1.1
diff -u -r1.1 inc.html
--- include/inc.html    2000/08/17 00:58:12     1.1
+++ include/inc.html    2000/11/23 14:56:07
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 <head>
@@ -11,7 +11,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="include.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="include.txt">Source Code for Include Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/include/include.jsp">Source Code for 
+Include Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find include/include.txt
cvs server: Diffing jsptoserv
Index: jsptoserv/jts.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/jsptoserv/jts.html,v
retrieving revision 1.1
diff -u -r1.1 jts.html
--- jsptoserv/jts.html  2000/08/17 00:58:14     1.1
+++ jsptoserv/jts.html  2000/11/23 14:56:09
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,10 +12,10 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="jsptoservlet.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="jts.txt">Source Code for JSP calling servlet <font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/jsptoserv/jsptoservlet.jsp">Source Code 
+for JSP calling servlet <font color="#0000FF"></a>
   </font> </h3>
 
-<h3><a href="stj.txt">Source Code for Servlet calling JSP 
+<h3><a href="stj.txt">Source Code for Servlet calling JSP
 <font color="#0000FF"></a> </font> </h3>
 
 </body>
cvs server: cannot find jsptoserv/jts.txt
cvs server: Diffing num
cvs server: cannot find num/numguess.txt
cvs server: Diffing plugin
Index: plugin/plugin.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/plugin/plugin.html,v
retrieving revision 1.1
diff -u -r1.1 plugin.html
--- plugin/plugin.html  2000/08/17 00:58:15     1.1
+++ plugin/plugin.html  2000/11/23 14:56:12
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 <head>
@@ -11,7 +11,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="plugin.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="plugin.txt">Source Code for Plugin Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/plugin/plugin.jsp">Source Code for Plugin 
+Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find plugin/plugin.txt
cvs server: Diffing plugin/applet
cvs server: Diffing security
cvs server: Diffing security/login
cvs server: Diffing security/protected
cvs server: Diffing sessions
cvs server: cannot find sessions/carts.txt
Index: sessions/crt.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/sessions/crt.html,v
retrieving revision 1.1
diff -u -r1.1 crt.html
--- sessions/crt.html   2000/08/17 00:58:18     1.1
+++ sessions/crt.html   2000/11/23 14:56:23
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="carts.html"><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="carts.txt">Source Code for Cart Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/sessions/carts.jsp">Source Code for Cart 
+Example<font color="#0000FF"></a>
   </font> </h3>
 
 <h3><a href="DummyCart.html">Property Sheet for DummyCart
cvs server: Diffing simpletag
Index: simpletag/foo.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/simpletag/foo.html,v
retrieving revision 1.1
diff -u -r1.1 foo.html
--- simpletag/foo.html  2000/08/17 00:58:19     1.1
+++ simpletag/foo.html  2000/11/23 14:56:25
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 <head>
@@ -11,7 +11,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="foo.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="foo.txt">Source Code for the Simple Tag Example<font color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/simpletag/foo.jsp">Source Code for the 
+Simple Tag Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find simpletag/foo.txt
cvs server: Diffing snp
Index: snp/snoop.html
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/examples/jsp/snp/snoop.html,v
retrieving revision 1.1
diff -u -r1.1 snoop.html
--- snp/snoop.html      2000/08/17 00:58:19     1.1
+++ snp/snoop.html      2000/11/23 14:56:27
@@ -1,6 +1,6 @@
 <html>
 <!--
-  Copyright (c) 1999 The Apache Software Foundation.  All rights 
+  Copyright (c) 1999 The Apache Software Foundation.  All rights
   reserved.
 -->
 
@@ -12,7 +12,7 @@
 <body bgcolor="#FFFFFF">
 <p><font color="#0000FF"><a href="snoop.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="snoop.txt">Source Code for Request Parameters Example<font 
color="#0000FF"></a>
+<h3><a href="/examples/jsp/source.jsp?/jsp/snp/snoop.jsp">Source Code for Request 
+Parameters Example<font color="#0000FF"></a>
   </font> </h3>
 
 </body>
cvs server: cannot find snp/snoop.txt

*****CVS exited normally with code 1*****

Reply via email to