You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2011/11/10 04:57:58 UTC
svn commit: r1200118 - in /tomcat/tc7.0.x/trunk/webapps/examples/jsp: ./
async/ cal/ checkbox/ colors/ error/ forward/ include/
Author: kkolinko
Date: Thu Nov 10 03:57:58 2011
New Revision: 1200118
URL: http://svn.apache.org/viewvc?rev=1200118&view=rev
Log:
Merging r1187809 - Trailing whitespace removal from /webapps
/webapps/examples, 1 of n
Modified:
tomcat/tc7.0.x/trunk/webapps/examples/jsp/async/index.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/login.html
tomcat/tc7.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colors.html
tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/err.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/forward/forward.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/include/include.jsp
tomcat/tc7.0.x/trunk/webapps/examples/jsp/index.html
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/async/index.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/async/index.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/async/index.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/async/index.jsp Thu Nov 10 03:57:58 2011
@@ -19,16 +19,16 @@
<pre>
Use cases:
-1. Simple dispatch
+1. Simple dispatch
- servlet does startAsync()
- - background thread calls ctx.dispatch()
+ - background thread calls ctx.dispatch()
<a href="<%=response.encodeURL("/examples/async/async0")%>"> Async 0 </a>
-
+
2. Simple dispatch
- servlet does startAsync()
- background thread calls dispatch(/path/to/jsp)
<a href="<%=response.encodeURL("/examples/async/async1")%>"> Async 1 </a>
-
+
3. Simple dispatch
- servlet does startAsync()
- background thread calls writes and calls complete()
@@ -43,27 +43,27 @@ Use cases:
3. Timeout s1
- servlet does a startAsync()
- servlet does a setAsyncTimeout
- - returns - waits for timeout to happen should return error page
-
+ - returns - waits for timeout to happen should return error page
+
4. Timeout s2
- servlet does a startAsync()
- servlet does a setAsyncTimeout
- servlet does a addAsyncListener
- - returns - waits for timeout to happen and listener invoked
-
+ - returns - waits for timeout to happen and listener invoked
+
5. Dispatch to asyncSupported=false servlet
- servlet1 does a startAsync()
- servlet1 dispatches to dispatch(/servlet2)
- the container calls complete() after servlet2 is complete
- TODO
-
+
6. Chained dispatch
- servlet1 does a startAsync
- servlet1 does a dispatch to servlet2 (asyncsupported=true)
- servlet2 does a dispatch to servlet3 (asyncsupported=true)
- - servlet3 does a dispatch to servlet4 (asyncsupported=false)
-
-
+ - servlet3 does a dispatch to servlet4 (asyncsupported=false)
+
+
7. Stock ticker
<a href="<%=response.encodeURL("/examples/async/stockticker")%>"> StockTicker </a>
</pre>
\ No newline at end of file
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal1.jsp Thu Nov 10 03:57:58 2011
@@ -15,7 +15,7 @@
limitations under the License.
--%>
<HTML>
-<HEAD><TITLE>
+<HEAD><TITLE>
Calendar: A JSP APPLICATION
</TITLE></HEAD>
@@ -52,13 +52,13 @@
cal.Entry entr = table.getEntries().getEntry(i);
%>
<TR>
- <TD>
+ <TD>
<A HREF=cal2.jsp?time=<%= entr.getHour() %>>
<%= entr.getHour() %> </A>
</TD>
<TD BGCOLOR=<%= entr.getColor() %>>
<% out.print(util.HTMLFilter.filter(entr.getDescription())); %>
- </TD>
+ </TD>
</TR>
<%
}
@@ -70,7 +70,7 @@
<!-- footer -->
<TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
<TR>
-<TD ALIGN=CENTER> <% out.print(util.HTMLFilter.filter(table.getName())); %> :
+<TD ALIGN=CENTER> <% out.print(util.HTMLFilter.filter(table.getName())); %> :
<% out.print(util.HTMLFilter.filter(table.getEmail())); %> </TD>
</TR>
</TABLE>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/cal2.jsp Thu Nov 10 03:57:58 2011
@@ -15,7 +15,7 @@
limitations under the License.
--%>
<HTML>
-<HEAD><TITLE>
+<HEAD><TITLE>
Calendar: A JSP APPLICATION
</TITLE></HEAD>
@@ -23,7 +23,7 @@
<BODY BGCOLOR="white">
<jsp:useBean id="table" scope="session" class="cal.TableBean" />
-<%
+<%
String time = request.getParameter ("time");
%>
@@ -32,7 +32,7 @@
<BR> Time <%= util.HTMLFilter.filter(time) %> </h3>
</FONT>
<FORM METHOD=POST ACTION=cal1.jsp>
-<BR>
+<BR>
<BR> <INPUT NAME="date" TYPE=HIDDEN VALUE="current">
<BR> <INPUT NAME="time" TYPE=HIDDEN VALUE="<%= util.HTMLFilter.filter(time) %>">
<BR> <h2> Description of the event <INPUT NAME="description" TYPE=TEXT SIZE=20> </h2>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/login.html
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/login.html?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/login.html (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/cal/login.html Thu Nov 10 03:57:58 2011
@@ -38,8 +38,8 @@
</form>
<hr>
-<font size=3 color="red"> Note: This application does not implement the complete
-functionality of a typical calendar application. It demostartes a way JSP can be
+<font size=3 color="red"> Note: This application does not implement the complete
+functionality of a typical calendar application. It demostartes a way JSP can be
used with html tables and forms.</font>
</center>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/checkbox/checkresult.jsp Thu Nov 10 03:57:58 2011
@@ -23,7 +23,7 @@
<jsp:setProperty name="foo" property="fruit" param="fruit" />
<hr>
The checked fruits (got using request) are: <br>
-<%
+<%
fruits = request.getParameterValues("fruit");
%>
<ul>
@@ -43,7 +43,7 @@ The checked fruits (got using request) a
The checked fruits (got using beans) are <br>
-<%
+<%
fruits = foo.getFruit();
%>
<ul>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colors.html
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colors.html?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colors.html (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colors.html Thu Nov 10 03:57:58 2011
@@ -20,16 +20,16 @@
<font size=6 color=red>
<hr>
-This web page is an example using JSP and BEANs.
+This web page is an example using JSP and BEANs.
<p>
-Guess my favorite two colors
+Guess my favorite two colors
<p> If you fail to guess both of them - you get yellow on red.
-<p> If you guess one of them right, either your foreground or
+<p> If you guess one of them right, either your foreground or
your background will change to the color that was guessed right.
-<p> Guess them both right and your browser foreground/background
+<p> Guess them both right and your browser foreground/background
will change to my two favorite colors to display this page.
<hr>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/colors/colrs.jsp Thu Nov 10 03:57:58 2011
@@ -28,7 +28,7 @@
<p>
<% if (cb.getHint()==true) { %>
-
+
<p> Hint #1: Vampires prey at night!
<p> <p> Hint #2: Nancy without the n.
@@ -38,7 +38,7 @@
<p> CONGRATULATIONS!!
<% if (cb.getHintTaken()==true) { %>
-
+
<p> ( although I know you cheated and peeked into the hints)
<% } %>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/err.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/err.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/err.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/err.jsp Thu Nov 10 03:57:58 2011
@@ -19,7 +19,7 @@
<%@ page errorPage="errorpge.jsp" %>
<jsp:useBean id="foo" scope="request" class="error.Smart" />
- <%
+ <%
String name = null;
if (request.getParameter("name") == null) {
@@ -35,7 +35,7 @@
<H1> Yes!!! <a href="http://www.acura.com">Acura</a> is my favorite car.
- <%
+ <%
}
}
%>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/error/errorpge.jsp Thu Nov 10 03:57:58 2011
@@ -20,6 +20,6 @@
<%@ page isErrorPage="true" %>
<h1> The exception <%= exception.getMessage() %> tells me you
- made a wrong choice.
+ made a wrong choice.
</body>
</html>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/forward/forward.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/forward/forward.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/forward/forward.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/forward/forward.jsp Thu Nov 10 03:57:58 2011
@@ -15,11 +15,11 @@
limitations under the License.
--%>
<html>
-<%
+<%
double freeMem = Runtime.getRuntime().freeMemory();
double totlMem = Runtime.getRuntime().totalMemory();
double percent = freeMem/totlMem;
- if (percent < 0.5) {
+ if (percent < 0.5) {
%>
<jsp:forward page="one.jsp"/>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/include/include.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/include/include.jsp?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/include/include.jsp (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/include/include.jsp Thu Nov 10 03:57:58 2011
@@ -30,6 +30,6 @@
<jsp:include page="foo.jsp" flush="true"/>
-:-)
+:-)
</html>
Modified: tomcat/tc7.0.x/trunk/webapps/examples/jsp/index.html
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/jsp/index.html?rev=1200118&r1=1200117&r2=1200118&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/examples/jsp/index.html (original)
+++ tomcat/tc7.0.x/trunk/webapps/examples/jsp/index.html Thu Nov 10 03:57:58 2011
@@ -335,7 +335,7 @@ This can be done using browser options.
<tr VALIGN=TOP>
<td>If </td>
<td VALIGN=TOP WIDTH="30%">
- <a href="tagplugin/if.jsp"><img SRC="images/execute.gif" HSPACE=4 BORDER=0
+ <a href="tagplugin/if.jsp"><img SRC="images/execute.gif" HSPACE=4 BORDER=0
align=TOP></a>
<a href="tagplugin/if.jsp">Execute</a>
</td>
@@ -349,7 +349,7 @@ ght=24 width=24 align=TOP></a>
<tr VALIGN=TOP>
<td>ForEach </td>
<td VALIGN=TOP WIDTH="30%">
- <a href="tagplugin/foreach.jsp"><img SRC="images/execute.gif" HSPACE=4 BORDER=0
+ <a href="tagplugin/foreach.jsp"><img SRC="images/execute.gif" HSPACE=4 BORDER=0
align=TOP></a>
<a href="tagplugin/foreach.jsp">Execute</a>
</td>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org