tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r410080 [1/6] - in /tomcat/tc6.0.x/trunk/webapps/examples: ./ WEB-INF/ WEB-INF/classes/ WEB-INF/classes/cal/ WEB-INF/classes/chat/ WEB-INF/classes/checkbox/ WEB-INF/classes/colors/ WEB-INF/classes/compressionFilters/ WEB-INF/classes/dates/ ...
Date Mon, 29 May 2006 11:51:43 GMT
Author: remm
Date: Mon May 29 04:51:34 2006
New Revision: 410080

URL: http://svn.apache.org/viewvc?rev=410080&view=rev
Log:
- Add examples webapp.
- New chat example, which doesn't work properly yet (I suck at HTML). For some reason, it works with
  a telnet, but not with a browser, which doesn't do any rendering until the whole page is received.

Added:
    tomcat/tc6.0.x/trunk/webapps/examples/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/compressionFilters/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilterTestServlet.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/dates/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/dates/JspCalendar.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/error/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/error/Smart.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/ExampleTagBase.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/FooTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/FooTagExtraInfo.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/LogTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/examples/ShowSource.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/filters/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/filters/ExampleFilter.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/filters/RequestDumperFilter.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/BookBean.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/FooBean.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/el/Functions.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/listeners/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/listeners/ContextListener.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/listeners/SessionListener.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/num/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/num/NumberGuessBean.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/servletToJsp.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/util/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/util/HTMLFilter.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/validators/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/validators/DebugValidator.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp/applet/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp/applet/Clock2.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp2/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/jsp2/jsp2-example-taglib.tld   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/lib/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/lib/jstl.jar   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/lib/standard.jar   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/tags/
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/tags/displayProducts.tag
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/tags/helloWorld.tag
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/tags/panel.tag
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/tags/xhtmlbasic.tag
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/web.xml   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/cal/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/cal/calendar.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/cal/login.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/chat/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/chat/chat.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/chat/login.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/chat/post.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/checkbox/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/checkbox/CheckTest.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/checkbox/check.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/checkbox/cresult.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/colors/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/colors/ColorGameBean.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/colors/clr.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/colors/colors.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/dates/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/dates/date.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/dates/date.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/error/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/error/er.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/error/err.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/error/error.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/forward/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/forward/forward.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/forward/fwd.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/forward/one.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/forward/two.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/images/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/images/code.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/images/execute.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/images/read.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/images/return.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/include/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/include/foo.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/include/foo.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/include/inc.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/include/include.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/index.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/basic-arithmetic.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/basic-arithmetic.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/basic-comparisons.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/basic-comparisons.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/functions.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/functions.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/implicit-objects.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/el/implicit-objects.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspattribute/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspattribute/shuffle.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/basic.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/svgexample.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/textRotate.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/textRotate.jpg   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/jspx/textRotate.jspx
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/coda.jspf
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/config.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/config.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/misc/prelude.jspf
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/book.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/hello.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/simpletag/repeat.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/hello.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/panel.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsp2/tagfiles/products.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/hello.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jsptoservlet.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/jsptoserv/jts.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/num/numguess.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/applet/Clock2.java   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/plugin/plugin.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/error.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/index.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/security/protected/login.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/DummyCart.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/carts.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/sessions/crt.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/simpletag/foo.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/snp/snoop.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/source.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/choose.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/foreach.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/howto.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/if.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/tagplugin/notes.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.html   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/jsp/xml/xml.jsp   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/servlets/
    tomcat/tc6.0.x/trunk/webapps/examples/servlets/images/
    tomcat/tc6.0.x/trunk/webapps/examples/servlets/images/code.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/servlets/images/execute.gif   (with props)
    tomcat/tc6.0.x/trunk/webapps/examples/servlets/images/return.gif   (with props)

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,121 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: CookieExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import util.HTMLFilter;
+
+/**
+ * Example servlet showing request headers
+ *
+ * @author James Duncan Davidson <duncan@eng.sun.com>
+ */
+
+public class CookieExample extends HttpServlet {
+
+    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+    
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        response.setContentType("text/html");
+
+        PrintWriter out = response.getWriter();
+        out.println("<html>");
+        out.println("<body bgcolor=\"white\">");
+        out.println("<head>");
+
+        String title = rb.getString("cookies.title");
+        out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body>");
+
+	// relative links
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue 
+	
+        out.println("<a href=\"../cookies.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+
+        out.println("<h3>" + title + "</h3>");
+
+        Cookie[] cookies = request.getCookies();
+        if ((cookies != null) && (cookies.length > 0)) {
+            out.println(rb.getString("cookies.cookies") + "<br>");
+            for (int i = 0; i < cookies.length; i++) {
+                Cookie cookie = cookies[i];
+                out.print("Cookie Name: " + HTMLFilter.filter(cookie.getName())
+                          + "<br>");
+                out.println("  Cookie Value: " 
+                            + HTMLFilter.filter(cookie.getValue())
+                            + "<br><br>");
+            }
+        } else {
+            out.println(rb.getString("cookies.no-cookies"));
+        }
+
+        String cookieName = request.getParameter("cookiename");
+        String cookieValue = request.getParameter("cookievalue");
+        if (cookieName != null && cookieValue != null) {
+            Cookie cookie = new Cookie(cookieName, cookieValue);
+            response.addCookie(cookie);
+            out.println("<P>");
+            out.println(rb.getString("cookies.set") + "<br>");
+            out.print(rb.getString("cookies.name") + "  " 
+                      + HTMLFilter.filter(cookieName) + "<br>");
+            out.print(rb.getString("cookies.value") + "  " 
+                      + HTMLFilter.filter(cookieValue));
+        }
+        
+        out.println("<P>");
+        out.println(rb.getString("cookies.make-cookie") + "<br>");
+        out.print("<form action=\"");
+        out.println("CookieExample\" method=POST>");
+        out.print(rb.getString("cookies.name") + "  ");
+        out.println("<input type=text length=20 name=cookiename><br>");
+        out.print(rb.getString("cookies.value") + "  ");
+        out.println("<input type=text length=20 name=cookievalue><br>");
+        out.println("<input type=submit></form>");
+            
+            
+        out.println("</body>");
+        out.println("</html>");
+    }
+
+    public void doPost(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,75 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: HelloWorldExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+/**
+ * The simplest possible servlet.
+ *
+ * @author James Duncan Davidson
+ */
+
+public class HelloWorldExample extends HttpServlet {
+
+
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        ResourceBundle rb =
+            ResourceBundle.getBundle("LocalStrings",request.getLocale());
+        response.setContentType("text/html");
+        PrintWriter out = response.getWriter();
+
+        out.println("<html>");
+        out.println("<head>");
+
+	    String title = rb.getString("helloworld.title");
+
+	    out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body bgcolor=\"white\">");
+
+	// note that all links are created to be relative. this
+	// ensures that we can move the web application that this
+	// servlet belongs to to a different place in the url
+	// tree and not have any harmful side effects.
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue
+
+	    out.println("<a href=\"../helloworld.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+        out.println("<h1>" + title + "</h1>");
+        out.println("</body>");
+        out.println("</html>");
+    }
+}
+
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/HelloWorldExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties Mon May 29 04:51:34 2006
@@ -0,0 +1,52 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.
+
+# $Id: LocalStrings.properties 267129 2004-03-18 16:40:35Z jfarcand $
+
+# Default localized resources for example servlets
+# This locale is en_US
+
+helloworld.title=Hello World!
+
+requestinfo.title=Request Information Example
+requestinfo.label.method=Method:
+requestinfo.label.requesturi=Request URI:
+requestinfo.label.protocol=Protocol:
+requestinfo.label.pathinfo=Path Info:
+requestinfo.label.remoteaddr=Remote Address:
+
+requestheader.title=Request Header Example
+
+requestparams.title=Request Parameters Example
+requestparams.params-in-req=Parameters in this request:
+requestparams.no-params=No Parameters, Please enter some
+requestparams.firstname=First Name:
+requestparams.lastname=Last Name:
+
+cookies.title=Cookies Example
+cookies.cookies=Your browser is sending the following cookies:
+cookies.no-cookies=Your browser isn't sending any cookies
+cookies.make-cookie=Create a cookie to send to your browser
+cookies.name=Name:
+cookies.value=Value:
+cookies.set=You just sent the following cookie to your browser:
+
+sessions.title=Sessions Example
+sessions.id=Session ID:
+sessions.created=Created:
+sessions.lastaccessed=Last Accessed:
+sessions.data=The following data is in your session:
+sessions.adddata=Add data to your session
+sessions.dataname=Name of Session Attribute:
+sessions.datavalue=Value of Session Attribute:

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties Mon May 29 04:51:34 2006
@@ -0,0 +1,52 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.
+
+# $Id: LocalStrings_en.properties 267129 2004-03-18 16:40:35Z jfarcand $
+
+# Default localized resources for example servlets
+# This locale is en_US
+
+helloworld.title=Hello World!
+
+requestinfo.title=Request Information Example
+requestinfo.label.method=Method:
+requestinfo.label.requesturi=Request URI:
+requestinfo.label.protocol=Protocol:
+requestinfo.label.pathinfo=Path Info:
+requestinfo.label.remoteaddr=Remote Address:
+
+requestheader.title=Request Header Example
+
+requestparams.title=Request Parameters Example
+requestparams.params-in-req=Parameters in this request:
+requestparams.no-params=No Parameters, Please enter some
+requestparams.firstname=First Name:
+requestparams.lastname=Last Name:
+
+cookies.title=Cookies Example
+cookies.cookies=Your browser is sending the following cookies:
+cookies.no-cookies=Your browser isn't sending any cookies
+cookies.make-cookie=Create a cookie to send to your browser
+cookies.name=Name:
+cookies.value=Value:
+cookies.set=You just sent the following cookie to your browser:
+
+sessions.title=Sessions Example
+sessions.id=Session ID:
+sessions.created=Created:
+sessions.lastaccessed=Last Accessed:
+sessions.data=The following data is in your session:
+sessions.adddata=Add data to your session
+sessions.dataname=Name of Session Attribute:
+sessions.datavalue=Value of Session Attribute:

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_en.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties Mon May 29 04:51:34 2006
@@ -0,0 +1,52 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.
+
+# $Id: LocalStrings_es.properties 267129 2004-03-18 16:40:35Z jfarcand $
+#
+# Default localized string information
+# Localized para Locale es_ES
+
+helloworld.title=Hola Mundo!
+
+requestinfo.title=Ejemplo de Informacion de Request
+requestinfo.label.method=Metodo:
+requestinfo.label.requesturi=Request URI:
+requestinfo.label.protocol=Protocolo:
+requestinfo.label.pathinfo=Path Info:
+requestinfo.label.remoteaddr=Direccion Remota:
+
+requestheader.title=Ejemplo de Cabecera de Request
+
+requestparams.title=Ejemplo de parametros de Request
+requestparams.params-in-req=Parametros en este Request:
+requestparams.no-params=No hay parametro. por favor usa alguno
+requestparams.firstname=Nombre:
+requestparams.lastname=Apellidos:
+
+cookies.title=Ejemplo de Cookies
+cookies.cookies=Tu navegador esta enviando los siguientes cookies:
+cookies.no-cookies=Tu navegador no esta enviando cookies
+cookies.make-cookie=Crea un cookie para enviarlo a tu navegador
+cookies.name=Nombre:
+cookies.value=Valor:
+cookies.set=Acabas de enviar a tu navegador estos cookies:
+
+sessions.title=ejemplo de Sesiones
+sessions.id=ID de Sesion:
+sessions.created=Creado:
+sessions.lastaccessed=Ultimo Acceso:
+sessions.data=Lo siguientes datos estan en tu sesion:
+sessions.adddata=Añade datos a tu sesion:
+sessions.dataname=Nombre del atributo de sesion:
+sessions.datavalue=Valor del atributo de sesion:

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_es.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties Mon May 29 04:51:34 2006
@@ -0,0 +1,52 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.
+
+# $Id: LocalStrings_fr.properties 267129 2004-03-18 16:40:35Z jfarcand $
+
+# Default localized resources for example servlets
+# This locale is fr_FR
+
+helloworld.title=Salut le Monde!
+
+requestinfo.title=Exemple d''information sur la requête
+requestinfo.label.method=Méthode:
+requestinfo.label.requesturi=URI de requête:
+requestinfo.label.protocol=Protocole:
+requestinfo.label.pathinfo=Info de chemin:
+requestinfo.label.remoteaddr=Adresse distante:
+
+requestheader.title=Exemple d''information sur les entête de requête
+
+requestparams.title=Exemple de requête avec paramêtres
+requestparams.params-in-req=Paramêtres dans la requête:
+requestparams.no-params=Pas de paramêtre, merci dans saisir quelqu'uns
+requestparams.firstname=Prénom:
+requestparams.lastname=Nom:
+
+cookies.title=Exemple d''utilisation de Cookies
+cookies.cookies=Votre navigateur retourne les cookies suivant:
+cookies.no-cookies=Votre navigateur ne retourne aucun cookie
+cookies.make-cookie=Création d''un cookie à retourner à votre navigateur
+cookies.name=Nom:
+cookies.value=Valeur:
+cookies.set=Vous venez d''envoyer le cookie suivant à votre navigateur:
+
+sessions.title=Exemple de Sessions
+sessions.id=ID de Session:
+sessions.created=Crée le:
+sessions.lastaccessed=Dernier accès:
+sessions.data=Les données existantes dans votre session:
+sessions.adddata=Ajouter des données à votre session
+sessions.dataname=Nom de l''Attribut de Session:
+sessions.datavalue=Valeur de l''Attribut de Session:

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_fr.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties Mon May 29 04:51:34 2006
@@ -0,0 +1,52 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed 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.
+
+# $Id: LocalStrings_pt.properties 267143 2004-08-24 18:38:35Z jfarcand $
+
+# Default localized resources for example servlets
+# This locale is pt_PT
+
+helloworld.title=Ola Mundo!
+
+requestinfo.title=Exemplo da Informacao do Pedido
+requestinfo.label.method=Metodo:
+requestinfo.label.requesturi=URI do Pedido:
+requestinfo.label.protocol=Protocolo:
+requestinfo.label.pathinfo=Informacao do Caminho:
+requestinfo.label.remoteaddr=Endereco Remoto:
+
+requestheader.title=Exemplo da Cebeceira do Pedido
+
+requestparams.title=Examplo de Parametros do Pedido
+requestparams.params-in-req=Parametros neste pedido:
+requestparams.no-params=Sem Parametros, Por favor entre alguns
+requestparams.firstname=Primeiro Nome:
+requestparams.lastname=Apelido:
+
+cookies.title=CExamplo de Cookies
+cookies.cookies=O se browser esta a enviar os seguintes cookies:
+cookies.no-cookies=O seu browser nao esta a enviar nenhuns cookies
+cookies.make-cookie=Crie um cookie para enviar para o seu browser
+cookies.name=Nome:
+cookies.value=Valor:
+cookies.set=Acabou de enviar o seguinte cookie para o seu browser:
+
+sessions.title=Examplo de sessoes
+sessions.id=Identificador da Sessao:
+sessions.created=Criada:
+sessions.lastaccessed=Ultima vez acedida:
+sessions.data=Os seguintes dados fazem parte da sua sessao:
+sessions.adddata=Adicione data a sua sessao
+sessions.dataname=Nome do atributo da sessao:
+sessions.datavalue=Valor do atributo da Sessao:

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/LocalStrings_pt.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,90 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: RequestHeaderExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import util.HTMLFilter;
+
+/**
+ * Example servlet showing request headers
+ *
+ * @author James Duncan Davidson <duncan@eng.sun.com>
+ */
+
+public class RequestHeaderExample extends HttpServlet {
+
+    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+    
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        response.setContentType("text/html");
+
+        PrintWriter out = response.getWriter();
+        out.println("<html>");
+        out.println("<body bgcolor=\"white\">");
+        out.println("<head>");
+
+        String title = rb.getString("requestheader.title");
+        out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body>");
+
+	// all links relative
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue 
+	
+        out.println("<a href=\"../reqheaders.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+
+        out.println("<h3>" + title + "</h3>");
+        out.println("<table border=0>");
+        Enumeration e = request.getHeaderNames();
+        while (e.hasMoreElements()) {
+            String headerName = (String)e.nextElement();
+            String headerValue = request.getHeader(headerName);
+            out.println("<tr><td bgcolor=\"#CCCCCC\">");
+            out.println(HTMLFilter.filter(headerName));
+            out.println("</td><td>");
+            out.println(HTMLFilter.filter(headerValue));
+            out.println("</td></tr>");
+        }
+        out.println("</table>");
+    }
+
+    public void doPost(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,114 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: RequestInfoExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import util.HTMLFilter;
+
+/**
+ * Example servlet showing request information.
+ *
+ * @author James Duncan Davidson <duncan@eng.sun.com>
+ */
+
+public class RequestInfoExample extends HttpServlet {
+
+
+    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        response.setContentType("text/html");
+
+        PrintWriter out = response.getWriter();
+        out.println("<html>");
+        out.println("<body>");
+        out.println("<head>");
+
+        String title = rb.getString("requestinfo.title");
+        out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body bgcolor=\"white\">");
+
+        // img stuff not req'd for source code html showing
+	// all links relative!
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue
+	
+        out.println("<a href=\"../reqinfo.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+
+        out.println("<h3>" + title + "</h3>");
+        out.println("<table border=0><tr><td>");
+        out.println(rb.getString("requestinfo.label.method"));
+        out.println("</td><td>");
+        out.println(request.getMethod());
+        out.println("</td></tr><tr><td>");
+        out.println(rb.getString("requestinfo.label.requesturi"));
+        out.println("</td><td>");        
+        out.println(HTMLFilter.filter(request.getRequestURI()));
+        out.println("</td></tr><tr><td>");        
+        out.println(rb.getString("requestinfo.label.protocol"));
+        out.println("</td><td>");        
+        out.println(request.getProtocol());
+        out.println("</td></tr><tr><td>");
+        out.println(rb.getString("requestinfo.label.pathinfo"));
+        out.println("</td><td>");        
+        out.println(HTMLFilter.filter(request.getPathInfo()));
+        out.println("</td></tr><tr><td>");
+        out.println(rb.getString("requestinfo.label.remoteaddr"));
+
+ 	String cipherSuite=
+ 	    (String)request.getAttribute("javax.servlet.request.cipher_suite");
+        out.println("</td><td>");                
+        out.println(request.getRemoteAddr());
+        out.println("</table>");
+
+ 	if(cipherSuite!=null){
+ 	    out.println("</td></tr><tr><td>");	
+ 	    out.println("SSLCipherSuite:");
+ 	    out.println("</td>");
+ 	    out.println("<td>");	    
+ 	    out.println(request.getAttribute("javax.servlet.request.cipher_suite"));
+	    out.println("</td>");	    
+ 	}
+	
+    }
+
+    public void doPost(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,106 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: RequestParamExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import util.HTMLFilter;
+
+/**
+ * Example servlet showing request headers
+ *
+ * @author James Duncan Davidson <duncan@eng.sun.com>
+ */
+
+public class RequestParamExample extends HttpServlet {
+
+
+    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+    
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        response.setContentType("text/html");
+
+        PrintWriter out = response.getWriter();
+        out.println("<html>");
+        out.println("<body>");
+        out.println("<head>");
+
+        String title = rb.getString("requestparams.title");
+        out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body bgcolor=\"white\">");
+
+        // img stuff not req'd for source code html showing
+
+	// all links relative
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue 
+	
+        out.println("<a href=\"../reqparams.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+
+        out.println("<h3>" + title + "</h3>");
+        String firstName = request.getParameter("firstname");
+        String lastName = request.getParameter("lastname");
+        out.println(rb.getString("requestparams.params-in-req") + "<br>");
+        if (firstName != null || lastName != null) {
+            out.println(rb.getString("requestparams.firstname"));
+            out.println(" = " + HTMLFilter.filter(firstName) + "<br>");
+            out.println(rb.getString("requestparams.lastname"));
+            out.println(" = " + HTMLFilter.filter(lastName));
+        } else {
+            out.println(rb.getString("requestparams.no-params"));
+        }
+        out.println("<P>");
+        out.print("<form action=\"");
+        out.print("RequestParamExample\" ");
+        out.println("method=POST>");
+        out.println(rb.getString("requestparams.firstname"));
+        out.println("<input type=text size=20 name=firstname>");
+        out.println("<br>");
+        out.println(rb.getString("requestparams.lastname"));
+        out.println("<input type=text size=20 name=lastname>");
+        out.println("<br>");
+        out.println("<input type=submit>");
+        out.println("</form>");
+
+        out.println("</body>");
+        out.println("</html>");
+    }
+
+    public void doPost(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java Mon May 29 04:51:34 2006
@@ -0,0 +1,140 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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.
+*/
+/* $Id: SessionExample.java 267129 2004-03-18 16:40:35Z jfarcand $
+ *
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import util.HTMLFilter;
+
+/**
+ * Example servlet showing request headers
+ *
+ * @author James Duncan Davidson <duncan@eng.sun.com>
+ */
+
+public class SessionExample extends HttpServlet {
+
+    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
+    
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        response.setContentType("text/html");
+
+        PrintWriter out = response.getWriter();
+        out.println("<html>");
+        out.println("<body bgcolor=\"white\">");
+        out.println("<head>");
+
+        String title = rb.getString("sessions.title");
+        out.println("<title>" + title + "</title>");
+        out.println("</head>");
+        out.println("<body>");
+
+        // img stuff not req'd for source code html showing
+	// relative links everywhere!
+
+        // XXX
+        // making these absolute till we work out the
+        // addition of a PathInfo issue 
+	
+        out.println("<a href=\"../sessions.html\">");
+        out.println("<img src=\"../images/code.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"view code\"></a>");
+        out.println("<a href=\"../index.html\">");
+        out.println("<img src=\"../images/return.gif\" height=24 " +
+                    "width=24 align=right border=0 alt=\"return\"></a>");
+
+        out.println("<h3>" + title + "</h3>");
+
+        HttpSession session = request.getSession(true);
+        out.println(rb.getString("sessions.id") + " " + session.getId());
+        out.println("<br>");
+        out.println(rb.getString("sessions.created") + " ");
+        out.println(new Date(session.getCreationTime()) + "<br>");
+        out.println(rb.getString("sessions.lastaccessed") + " ");
+        out.println(new Date(session.getLastAccessedTime()));
+
+        String dataName = request.getParameter("dataname");
+        String dataValue = request.getParameter("datavalue");
+        if (dataName != null && dataValue != null) {
+            session.setAttribute(dataName, dataValue);
+        }
+
+        out.println("<P>");
+        out.println(rb.getString("sessions.data") + "<br>");
+        Enumeration names = session.getAttributeNames();
+        while (names.hasMoreElements()) {
+            String name = (String) names.nextElement(); 
+            String value = session.getAttribute(name).toString();
+            out.println(HTMLFilter.filter(name) + " = " 
+                        + HTMLFilter.filter(value) + "<br>");
+        }
+
+        out.println("<P>");
+        out.print("<form action=\"");
+	out.print(response.encodeURL("SessionExample"));
+        out.print("\" ");
+        out.println("method=POST>");
+        out.println(rb.getString("sessions.dataname"));
+        out.println("<input type=text size=20 name=dataname>");
+        out.println("<br>");
+        out.println(rb.getString("sessions.datavalue"));
+        out.println("<input type=text size=20 name=datavalue>");
+        out.println("<br>");
+        out.println("<input type=submit>");
+        out.println("</form>");
+
+        out.println("<P>GET based form:<br>");
+        out.print("<form action=\"");
+	out.print(response.encodeURL("SessionExample"));
+        out.print("\" ");
+        out.println("method=GET>");
+        out.println(rb.getString("sessions.dataname"));
+        out.println("<input type=text size=20 name=dataname>");
+        out.println("<br>");
+        out.println(rb.getString("sessions.datavalue"));
+        out.println("<input type=text size=20 name=datavalue>");
+        out.println("<br>");
+        out.println("<input type=submit>");
+        out.println("</form>");
+
+        out.print("<p><a href=\"");
+	out.print(response.encodeURL("SessionExample?dataname=foo&datavalue=bar"));
+	out.println("\" >URL encoded </a>");
+	
+        out.println("</body>");
+        out.println("</html>");
+        
+        out.println("</body>");
+        out.println("</html>");
+    }
+
+    public void doPost(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java Mon May 29 04:51:34 2006
@@ -0,0 +1,72 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 cal;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import javax.servlet.http.*;
+
+public class Entries {
+
+  private Hashtable entries;
+  private static final String[] time = {"8am", "9am", "10am", "11am", "12pm", 
+					"1pm", "2pm", "3pm", "4pm", "5pm", "6pm",
+					"7pm", "8pm" };
+  public static final int rows = 12;
+
+  public Entries () {   
+   entries = new Hashtable (rows);
+   for (int i=0; i < rows; i++) {
+     entries.put (time[i], new Entry(time[i]));
+   }
+  }
+
+  public int getRows () {
+    return rows;
+  }
+
+  public Entry getEntry (int index) {
+    return (Entry)this.entries.get(time[index]);
+  }
+
+  public int getIndex (String tm) {
+    for (int i=0; i<rows; i++)
+      if(tm.equals(time[i])) return i;
+    return -1;
+  }
+
+  public void processRequest (HttpServletRequest request, String tm) {
+    int index = getIndex (tm);
+    if (index >= 0) {
+      String descr = request.getParameter ("description");
+      ((Entry)entries.get(time[index])).setDescription (descr);
+    }
+  }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java Mon May 29 04:51:34 2006
@@ -0,0 +1,54 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 cal;
+
+public class Entry {
+
+  String hour;
+  String description;
+  String color;
+
+  public Entry (String hour) {
+    this.hour = hour;
+    this.description = "";
+
+  }
+
+  public String getHour () {
+    return this.hour;
+  }
+
+  public String getColor () {
+    if (description.equals("")) return "lightblue";
+    else return "red";
+  }
+
+  public String getDescription () {
+    if (description.equals("")) return "None";
+    else return this.description;
+  }
+
+  public void setDescription (String descr) {
+    description = descr;
+  }
+ 
+}
+
+
+
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java Mon May 29 04:51:34 2006
@@ -0,0 +1,154 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 cal;
+
+import java.text.DateFormat;
+import java.util.*;
+
+public class JspCalendar {
+    Calendar  calendar = null;
+    Date currentDate;
+
+    public JspCalendar() {
+	calendar = Calendar.getInstance();
+	Date trialTime = new Date();
+	calendar.setTime(trialTime);
+    }
+
+
+    public int getYear() {
+	return calendar.get(Calendar.YEAR);
+    }
+    
+    public String getMonth() {
+	int m = getMonthInt();
+	String[] months = new String [] { "January", "February", "March",
+					"April", "May", "June",
+					"July", "August", "September",
+					"October", "November", "December" };
+	if (m > 12)
+	    return "Unknown to Man";
+	
+	return months[m - 1];
+
+    }
+
+    public String getDay() {
+	int x = getDayOfWeek();
+	String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", 
+				      "Thursday", "Friday", "Saturday"};
+
+	if (x > 7)
+	    return "Unknown to Man";
+
+	return days[x - 1];
+
+    }
+    
+    public int getMonthInt() {
+	return 1 + calendar.get(Calendar.MONTH);
+    }
+
+    public String getDate() {
+	return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();	
+    }
+
+    public String getCurrentDate() {
+        Date dt = new Date ();
+	calendar.setTime (dt);
+	return getMonthInt() + "/" + getDayOfMonth() + "/" +  getYear();
+
+    }
+
+    public String getNextDate() {
+        calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);
+	return getDate ();
+    }
+
+    public String getPrevDate() {
+        calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() - 1);
+	return getDate ();
+    }
+
+    public String getTime() {
+	return getHour() + ":" + getMinute() + ":" + getSecond();
+    }
+
+    public int getDayOfMonth() {
+	return calendar.get(Calendar.DAY_OF_MONTH);
+    }
+
+    public int getDayOfYear() {
+	return calendar.get(Calendar.DAY_OF_YEAR);
+    }
+
+    public int getWeekOfYear() {
+	return calendar.get(Calendar.WEEK_OF_YEAR);
+    }
+
+    public int getWeekOfMonth() {
+	return calendar.get(Calendar.WEEK_OF_MONTH);
+    }
+
+    public int getDayOfWeek() {
+	return calendar.get(Calendar.DAY_OF_WEEK);
+    }
+     
+    public int getHour() {
+	return calendar.get(Calendar.HOUR_OF_DAY);
+    }
+    
+    public int getMinute() {
+	return calendar.get(Calendar.MINUTE);
+    }
+
+
+    public int getSecond() {
+	return calendar.get(Calendar.SECOND);
+    }
+
+  
+    public int getEra() {
+	return calendar.get(Calendar.ERA);
+    }
+
+    public String getUSTimeZone() {
+	String[] zones = new String[] {"Hawaii", "Alaskan", "Pacific",
+				       "Mountain", "Central", "Eastern"};
+	
+	return zones[10 + getZoneOffset()];
+    }
+
+    public int getZoneOffset() {
+	return calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000);
+    }
+
+
+    public int getDSTOffset() {
+	return calendar.get(Calendar.DST_OFFSET)/(60*60*1000);
+    }
+
+    
+    public int getAMPM() {
+	return calendar.get(Calendar.AM_PM);
+    }
+}
+
+
+
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java Mon May 29 04:51:34 2006
@@ -0,0 +1,101 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 cal;
+
+import java.beans.*;
+import javax.servlet.http.*;
+import javax.servlet.*;
+import java.util.Hashtable;
+
+public class TableBean {
+
+  Hashtable table;
+  JspCalendar JspCal;
+  Entries entries;
+  String date;
+  String name = null;
+  String email = null;
+  boolean processError = false;
+
+  public TableBean () {
+    this.table = new Hashtable (10);
+    this.JspCal = new JspCalendar ();
+    this.date = JspCal.getCurrentDate ();
+  }
+
+  public void setName (String nm) {
+    this.name = nm;
+  }
+
+  public String getName () {
+    return this.name;
+  }
+  
+  public void setEmail (String mail) {
+    this.email = mail;
+  }
+
+  public String getEmail () {
+    return this.email;
+  }
+
+  public String getDate () {
+    return this.date;
+  }
+
+  public Entries getEntries () {
+    return this.entries;
+  }
+
+  public void processRequest (HttpServletRequest request) {
+
+    // Get the name and e-mail.
+    this.processError = false;
+    if (name == null || name.equals("")) setName(request.getParameter ("name"));  
+    if (email == null || email.equals("")) setEmail(request.getParameter ("email"));
+    if (name == null || email == null ||
+		name.equals("") || email.equals("")) {
+      this.processError = true;
+      return;
+    }
+
+    // Get the date.
+    String dateR = request.getParameter ("date");
+    if (dateR == null) date = JspCal.getCurrentDate ();
+    else if (dateR.equalsIgnoreCase("next")) date = JspCal.getNextDate ();
+    else if (dateR.equalsIgnoreCase("prev")) date = JspCal.getPrevDate ();
+
+    entries = (Entries) table.get (date);
+    if (entries == null) {
+      entries = new Entries ();
+      table.put (date, entries);
+    }
+
+    // If time is provided add the event.
+	String time = request.getParameter("time");
+    if (time != null) entries.processRequest (request, time);
+  }
+
+  public boolean getProcessError () {
+    return this.processError;
+  }
+}
+
+
+
+
+
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java Mon May 29 04:51:34 2006
@@ -0,0 +1,212 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed 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 chat;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+import org.apache.catalina.servlets.CometServlet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * Helper class to implement Comet functionality.
+ */
+public class ChatServlet
+    extends CometServlet {
+
+    protected ArrayList<HttpServletResponse> connections = 
+        new ArrayList<HttpServletResponse>();
+    protected MessageSender messageSender = null;
+    
+    public void init() throws ServletException {
+        messageSender = new MessageSender();
+        Thread messageSenderThread = 
+            new Thread(messageSender, "MessageSender[" + getServletContext().getContextPath() + "]");
+        messageSenderThread.setDaemon(true);
+        messageSenderThread.start();
+    }
+
+    public void destroy() {
+        connections.clear();
+        messageSender.stop();
+        messageSender = null;
+    }
+
+    public void begin(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
+        super.begin(request, response);
+        log("Begin for session: " + request.getSession(true).getId());
+        
+        PrintWriter writer = response.getWriter();
+        writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
+        writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
+        writer.flush();
+
+        synchronized(connections) {
+            connections.add(response);
+        }
+    }
+    
+    public void end(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
+        super.end(request, response);
+        log("End for session: " + request.getSession(true).getId());
+        synchronized(connections) {
+            connections.remove(response);
+        }
+        
+        PrintWriter writer = response.getWriter();
+        writer.println("</body></html>");
+        
+    }
+    
+    public void error(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
+        log("Error for session: " + request.getSession(true).getId());
+        end(request, response);
+    }
+    
+    public boolean read(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
+        InputStream is = request.getInputStream();
+        byte[] buf = new byte[512];
+        do {
+            int n = is.read(buf);
+            if (n > 0) {
+                log("Read " + n + " bytes: " + new String(buf, 0, n) 
+                        + " for session: " + request.getSession(true).getId());
+            } else if (n < 0) {
+                return false;
+            }
+        } while (is.available() > 0);
+        return true;
+    }
+
+    protected void service(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
+        String action = request.getParameter("action");
+        if (action != null) {
+            if ("login".equals(action)) {
+                String nickname = request.getParameter("nickname");
+                request.getSession(true).setAttribute("nickname", nickname);
+                response.sendRedirect("post.jsp");
+            } else {
+                String nickname = (String) request.getSession(true).getAttribute("nickname");
+                String message = request.getParameter("message");
+                messageSender.send(nickname, message);
+                response.sendRedirect("post.jsp");
+            }
+        } else {
+            if (request.getSession(true).getAttribute("nickname") == null) {
+                // Redirect to "login"
+                response.sendRedirect("login.jsp");
+            } else {
+                // Request to view the chet, so use Comet
+                super.service(request, response);
+            }
+        }
+    }
+    
+
+    /**
+     * Poller class.
+     */
+    public class MessageSender implements Runnable {
+
+        protected boolean running = true;
+        protected ArrayList<String> messages = new ArrayList<String>();
+        
+        public MessageSender() {
+        }
+        
+        public void stop() {
+            running = false;
+        }
+
+        /**
+         * Add specified socket and associated pool to the poller. The socket will
+         * be added to a temporary array, and polled first after a maximum amount
+         * of time equal to pollTime (in most cases, latency will be much lower,
+         * however).
+         *
+         * @param socket to add to the poller
+         */
+        public void send(String user, String message) {
+            synchronized (messages) {
+                messages.add("[" + user + "]: " + message);
+                messages.notify();
+            }
+        }
+
+        /**
+         * The background thread that listens for incoming TCP/IP connections and
+         * hands them off to an appropriate processor.
+         */
+        public void run() {
+
+            // Loop until we receive a shutdown command
+            while (running) {
+                // Loop if endpoint is paused
+
+                if (messages.size() == 0) {
+                    try {
+                        synchronized (messages) {
+                            messages.wait();
+                        }
+                    } catch (InterruptedException e) {
+                        // Ignore
+                    }
+                }
+
+                synchronized (connections) {
+                    String[] pendingMessages = null;
+                    synchronized (messages) {
+                        pendingMessages = messages.toArray(new String[0]);
+                        messages.clear();
+                    }
+                    for (int i = 0; i < connections.size(); i++) {
+                        try {
+                            PrintWriter writer = connections.get(i).getWriter();
+                            for (int j = 0; j < pendingMessages.length; j++) {
+                                // FIXME: Add HTML filtering
+                                writer.println(pendingMessages[j] + "<br>");
+                            }
+                            writer.flush();
+                        } catch (IOException e) {
+                            log("IOExeption sending message", e);
+                        }
+                    }
+                }
+
+            }
+
+        }
+
+    }
+
+
+
+
+}

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java Mon May 29 04:51:34 2006
@@ -0,0 +1,30 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 checkbox;
+
+public class CheckTest {
+
+    String b[] = new String[] { "1", "2", "3", "4" };
+
+    public String[] getFruit() {
+	return b;
+    }
+
+    public void setFruit(String [] b) {
+	this.b = b;
+    }
+}

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java?rev=410080&view=auto
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java (added)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java Mon May 29 04:51:34 2006
@@ -0,0 +1,114 @@
+/*
+* Copyright 2004 The Apache Software Foundation
+*
+* Licensed 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 colors;
+
+import javax.servlet.http.*;
+
+public class ColorGameBean {
+
+    private String background = "yellow";
+    private String foreground = "red";
+    private String color1 = foreground;
+    private String color2 = background;
+    private String hint = "no";
+    private int attempts = 0;
+	private int intval = 0;
+    private boolean tookHints = false;
+
+    public void processRequest(HttpServletRequest request) {
+
+	// background = "yellow";
+	// foreground = "red";
+
+	if (! color1.equals(foreground)) {
+	    if (color1.equalsIgnoreCase("black") ||
+			color1.equalsIgnoreCase("cyan")) {
+			background = color1;
+		}
+	}
+
+	if (! color2.equals(background)) {
+	    if (color2.equalsIgnoreCase("black") ||
+			color2.equalsIgnoreCase("cyan")) {
+			foreground = color2;
+	    }
+	}
+
+	attempts++;
+    }
+
+    public void setColor2(String x) {
+	color2 = x;
+    }
+
+    public void setColor1(String x) {
+	color1 = x;
+    }
+
+    public void setAction(String x) {
+	if (!tookHints)
+	    tookHints = x.equalsIgnoreCase("Hint");
+	hint = x;
+    }
+
+    public String getColor2() {
+	 return background;
+    }
+
+    public String getColor1() {
+	 return foreground;
+    }
+
+    public int getAttempts() {
+	return attempts;
+    }
+
+    public boolean getHint() {
+	return hint.equalsIgnoreCase("Hint");
+    }
+
+    public boolean getSuccess() {
+	if (background.equalsIgnoreCase("black") ||
+	    background.equalsIgnoreCase("cyan")) {
+	
+	    if (foreground.equalsIgnoreCase("black") ||
+		foreground.equalsIgnoreCase("cyan"))
+		return true;
+	    else
+		return false;
+	}
+
+	return false;
+    }
+
+    public boolean getHintTaken() {
+	return tookHints;
+    }
+
+    public void reset() {
+	foreground = "red";
+	background = "yellow";
+    }
+
+    public void setIntval(int value) {
+	intval = value;
+	}
+
+    public int getIntval() {
+	return intval;
+	}
+}
+

Propchange: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message