You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 19:27:41 UTC

svn commit: r376788 [3/3] - /struts/el/trunk/web/exercise-taglib/

Modified: struts/el/trunk/web/exercise-taglib/logic-iterate.jsp
URL: http://svn.apache.org/viewcvs/struts/el/trunk/web/exercise-taglib/logic-iterate.jsp?rev=376788&r1=376787&r2=376788&view=diff
==============================================================================
--- struts/el/trunk/web/exercise-taglib/logic-iterate.jsp (original)
+++ struts/el/trunk/web/exercise-taglib/logic-iterate.jsp Fri Feb 10 10:27:39 2006
@@ -1,138 +1,156 @@
+<%@ page import="javax.servlet.jsp.PageContext"%>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <%@ page language="java" %>
-<%@ taglib uri="http://struts.apache.org/tags-html-el"  prefix="html-el" %>
-<%@ taglib uri="http://struts.apache.org/tags-bean-el"  prefix="bean-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <html-el:html>
 <head>
-<title>Test struts logic-el Iterate Tag</title>
+    <title>Test struts logic-el Iterate Tag</title>
 </head>
+
 <body bgcolor="white">
 
 <%
-  {
-    java.util.ArrayList list = new java.util.ArrayList();
-    list.add("First");
-    list.add("Second");
-    list.add("Third");
-    list.add("Fourth");
-    list.add("Fifth");
-    pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE);
-
-    int intArray[] = new int[]
-     { 0, 10, 20, 30, 40 };
-    pageContext.setAttribute("intArray", intArray, PageContext.PAGE_SCOPE);
-  }
+    {
+        java.util.ArrayList list = new java.util.ArrayList();
+        list.add("First");
+        list.add("Second");
+        list.add("Third");
+        list.add("Fourth");
+        list.add("Fifth");
+        pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE);
+
+        int intArray[] = new int[]
+                { 0, 10, 20, 30, 40 };
+        pageContext
+                .setAttribute("intArray", intArray, PageContext.PAGE_SCOPE);
+    }
 %>
 
 <div align="center">
-<h1>Test struts logic-el Iterate Tag</h1>
+    <h1>Test struts logic-el Iterate Tag</h1>
 </div>
 
-<jsp:useBean id="bean" scope="page" class="org.apache.struts.webapp.exercise.TestBean"/>
+<jsp:useBean id="bean" scope="page"
+             class="org.apache.struts.webapp.exercise.TestBean"/>
 <jsp:useBean id="list" scope="page" class="java.util.ArrayList"/>
 
 <h3>Test 1 - Iterate Over A String Array [0..4]</h3>
 
 <ol>
-<logic-el:iterate id="element" name="bean" property="stringArray" indexId="index">
-  <li><em><c:out value="${element}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="element" name="bean" property="stringArray"
+                      indexId="index">
+        <li><em><c:out value="${element}"/></em>&nbsp;[<c:out
+                value="${index}"/>]</li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 2 - Iterate Over A String Array [0..2]</h3>
 
 <ol>
-<logic-el:iterate id="element" name="bean" property="stringArray" indexId="index"
-        length="3">
-  <li><em><c:out value="${element}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="element" name="bean" property="stringArray"
+                      indexId="index"
+                      length="3">
+        <li><em><c:out value="${element}"/></em>&nbsp;[<c:out
+                value="${index}"/>]</li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 3 - Iterate Over A String Array [3..4]</h3>
 
 <ol>
-<logic-el:iterate id="element" name="bean" property="stringArray" indexId="index"
-        offset="3">
-  <li><em><c:out value="${element}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="element" name="bean" property="stringArray"
+                      indexId="index"
+                      offset="3">
+        <li><em><c:out value="${element}"/></em>&nbsp;[<c:out
+                value="${index}"/>]</li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 4 - Iterate Over A String Array [1..3]</h3>
 
 <ol>
-<logic-el:iterate id="element" name="bean" property="stringArray" indexId="index"
-               offset="1" length="3">
-  <li><em><c:out value="${element}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="element" name="bean" property="stringArray"
+                      indexId="index"
+                      offset="1" length="3">
+        <li><em><c:out value="${element}"/></em>&nbsp;[<c:out
+                value="${index}"/>]</li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 5 - Iterate Over an Array List</h3>
 
 <ol>
-<logic-el:iterate id="item" name="list" indexId="index">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="list" indexId="index">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 6 - Iterate Over an Array List [0..2]</h3>
 
 <ol>
-<logic-el:iterate id="item" name="list" indexId="index"
-       offset="0" length="3">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="list" indexId="index"
+                      offset="0" length="3">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 7 - Iterate Over an Array List [2..4]</h3>
 
 <ol>
-<logic-el:iterate id="item" name="list" indexId="index"
-       offset="2" length="3">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="list" indexId="index"
+                      offset="2" length="3">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 8 - Iterate Over an int array</h3>
 
 <ol>
-<logic-el:iterate id="item" name="intArray" indexId="index">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="intArray" indexId="index">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 9 - Iterate Over an int array [0..2]</h3>
 
 <ol>
-<logic-el:iterate id="item" name="intArray" indexId="index"
-           length="3">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="intArray" indexId="index"
+                      length="3">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 10 - Iterate Over an int array [2..4]</h3>
 
 <ol>
-<logic-el:iterate id="item" name="intArray" indexId="index"
-           offset="2" length="3">
-  <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]</li>
-</logic-el:iterate>
+    <logic-el:iterate id="item" name="intArray" indexId="index"
+                      offset="2" length="3">
+        <li><em><c:out value="${item}"/></em>&nbsp;[<c:out value="${index}"/>]
+        </li>
+    </logic-el:iterate>
 </ol>
 
 <h3>Test 11 - Iterate Over HTTP Headers</h3>
 
 <table border="1">
- <tr>
-  <th>Key</th>
-  <th>Value</th>
- </tr>
- <logic-el:iterate id="item" collection="${header}" indexId="index">
-  <tr>
-   <td><c:out value="${item.key}"/></td>
-   <td><c:out value="${item.value}"/></td>
-  </tr>
- </logic-el:iterate>
+    <tr>
+        <th>Key</th>
+        <th>Value</th>
+    </tr>
+    <logic-el:iterate id="item" collection="${header}" indexId="index">
+    <tr>
+        <td><c:out value="${item.key}"/></td>
+        <td><c:out value="${item.value}"/></td>
+    </tr>
+    </logic-el:iterate>
 
 </body>
 </html-el:html>

Modified: struts/el/trunk/web/exercise-taglib/logic-match.jsp
URL: http://svn.apache.org/viewcvs/struts/el/trunk/web/exercise-taglib/logic-match.jsp?rev=376788&r1=376787&r2=376788&view=diff
==============================================================================
--- struts/el/trunk/web/exercise-taglib/logic-match.jsp (original)
+++ struts/el/trunk/web/exercise-taglib/logic-match.jsp Fri Feb 10 10:27:39 2006
@@ -1,315 +1,327 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <%@ page language="java" %>
-<%@ taglib uri="http://struts.apache.org/tags-html-el"  prefix="html-el"  %>
-<%@ taglib uri="http://struts.apache.org/tags-bean-el"  prefix="bean-el"  %>
+<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <html-el:html>
 <head>
-<title>Test struts logic-el Match Tags</title>
+    <title>Test struts logic-el Match Tags</title>
 </head>
+
 <body bgcolor="white">
 
 <div align="center">
-<h1>Test struts logic-el Match Tags</h1>
+    <h1>Test struts logic-el Match Tags</h1>
 </div>
 
-<jsp:useBean id="bean" scope="page" class="org.apache.struts.webapp.exercise.TestBean"/>
+<jsp:useBean id="bean" scope="page"
+             class="org.apache.struts.webapp.exercise.TestBean"/>
 <c:set var="jcookie" value='${cookie["JSESSIONID"].value}'/>
 <c:set var="uaheader" value='${header["User-Agent"]}'/>
 <c:set var="rparam" value='${param["param1"]}'/>
 <%
-  pageContext.setAttribute("string", "String test value");
+    pageContext.setAttribute("string", "String test value");
 %>
 
 <table border="1">
-  <tr>
+<tr>
     <th>Test Type</th>
     <th>Variable Content</th>
     <th>Value Content</th>
     <th>Correct Value Test</th>
     <th>Test Result</th>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Cookie / Any</td>
-    <%-- This isn't an exact parallel.  With "bean:cookie", you can specify a
-					 default value.  That would take another step with this. --%>
+        <%-- This isn't an exact parallel.  With "bean:cookie", you can specify a
+                       default value.  That would take another step with this. --%>
     <td><c:out value="${jcookie}"/></td>
     <td>0</td>
     <td>contains</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty jcookie}">
-        <%-- The functionality of "logic:match" will eventually be available
-				 through a string function in the EL expression. --%>
-        <logic-el:match expr="${jcookie}" value="0">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${jcookie}" value="0">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty jcookie}">
+                <%-- The functionality of "logic:match" will eventually be available
+                     through a string function in the EL expression. --%>
+                <logic-el:match expr="${jcookie}" value="0">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${jcookie}" value="0">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Cookie / End</td>
     <td><c:out value="${jcookie}"/></td>
     <td>0</td>
     <td>ends with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty jcookie}">
-        <logic-el:match expr="${jcookie}" location="end" value="0">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${jcookie}" location="end" value="0">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty jcookie}">
+                <logic-el:match expr="${jcookie}" location="end" value="0">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${jcookie}" location="end" value="0">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Cookie / Start</td>
     <td><c:out value="${jcookie}"/></td>
     <td>0</td>
     <td>starts with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty jcookie}">
-        <logic-el:match expr="${jcookie}" location="start" value="0">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${jcookie}" location="start" value="0">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty jcookie}">
+                <logic-el:match expr="${jcookie}" location="start" value="0">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${jcookie}" location="start"
+                                   value="0">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Header / Any</td>
     <td><c:out value="${uaheader}"/></td>
     <td>Mozilla</td>
     <td>contains</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty uaheader}">
-        <logic-el:match expr="${uaheader}" value="Mozilla">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${uaheader}" value="Mozilla">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty uaheader}">
+                <logic-el:match expr="${uaheader}" value="Mozilla">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${uaheader}" value="Mozilla">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Header / End</td>
     <td><c:out value="${uaheader}"/></td>
     <td>Mozilla</td>
     <td>ends with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty uaheader}">
-        <logic-el:match expr="${uaheader}" location="end" value="Mozilla">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${uaheader}" location="end" value="Mozilla">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty uaheader}">
+                <logic-el:match expr="${uaheader}" location="end"
+                                value="Mozilla">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${uaheader}" location="end"
+                                   value="Mozilla">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Header / Start</td>
     <td><c:out value="${uaheader}"/></td>
     <td>Mozilla</td>
     <td>starts with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty uaheader}">
-        <logic-el:match expr="${uaheader}" location="start" value="Mozilla">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${uaheader}" location="start" value="Mozilla">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty uaheader}">
+                <logic-el:match expr="${uaheader}" location="start"
+                                value="Mozilla">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${uaheader}" location="start"
+                                   value="Mozilla">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Name / Any</td>
     <td><c:out value="${string}"/></td>
     <td>value</td>
     <td>contains</td>
     <td>
-      <logic-el:match name="string" value="value">
-        match
-      </logic-el:match>
-      <logic-el:notMatch name="string" value="value">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match name="string" value="value">
+            match
+        </logic-el:match>
+        <logic-el:notMatch name="string" value="value">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Name / End</td>
     <td><c:out value="${string}"/></td>
     <td>value</td>
     <td>ends with</td>
     <td>
-      <logic-el:match name="string" location="end" value="value">
-        match
-      </logic-el:match>
-      <logic-el:notMatch name="string" location="end" value="value">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match name="string" location="end" value="value">
+            match
+        </logic-el:match>
+        <logic-el:notMatch name="string" location="end" value="value">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Name / Start</td>
     <td><c:out value="${string}"/></td>
     <td>value</td>
     <td>starts with</td>
     <td>
-      <logic-el:match name="string" location="start" value="value">
-        match
-      </logic-el:match>
-      <logic-el:notMatch name="string" location="start" value="value">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match name="string" location="start" value="value">
+            match
+        </logic-el:match>
+        <logic-el:notMatch name="string" location="start" value="value">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Parameter / Any</td>
     <td><c:out value="${rparam}"/></td>
     <td>value1</td>
     <td>contains</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty rparam}">
-        <logic-el:match expr="${rparam}" value="value1">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${rparam}" value="value1">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty rparam}">
+                <logic-el:match expr="${rparam}" value="value1">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${rparam}" value="value1">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Parameter / End</td>
     <td><c:out value="${rparam}"/></td>
     <td>value1</td>
     <td>ends with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty rparam}">
-        <logic-el:match expr="${rparam}" location="end" value="value1">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${rparam}" location="end" value="value1">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty rparam}">
+                <logic-el:match expr="${rparam}" location="end"
+                                value="value1">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${rparam}" location="end"
+                                   value="value1">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Parameter / Start</td>
     <td><c:out value="${rparam}"/></td>
     <td>value1</td>
     <td>starts with</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty rparam}">
-        <logic-el:match expr="${rparam}" location="start" value="value1">
-         match
-        </logic-el:match>
-        <logic-el:notMatch expr="${rparam}" location="start" value="value1">
-         notMatch
-        </logic-el:notMatch>
-       </c:when>
-       <c:otherwise>
-        missing
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty rparam}">
+                <logic-el:match expr="${rparam}" location="start"
+                                value="value1">
+                    match
+                </logic-el:match>
+                <logic-el:notMatch expr="${rparam}" location="start"
+                                   value="value1">
+                    notMatch
+                </logic-el:notMatch>
+            </c:when>
+            <c:otherwise>
+                missing
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Property / Any</td>
     <td><c:out value="${bean.stringProperty}"/></td>
     <td>FOO</td>
     <td>contains</td>
     <td>
-      <logic-el:match expr="${bean.stringProperty}" value="FOO">
-        match
-      </logic-el:match>
-      <logic-el:notMatch expr="${bean.stringProperty}" value="FOO">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match expr="${bean.stringProperty}" value="FOO">
+            match
+        </logic-el:match>
+        <logic-el:notMatch expr="${bean.stringProperty}" value="FOO">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Property / End</td>
     <td><c:out value="${bean.stringProperty}"/></td>
     <td>FOO</td>
     <td>ends with</td>
     <td>
-      <logic-el:match expr="${bean.stringProperty}" location="end" value="FOO">
-        match
-      </logic-el:match>
-      <logic-el:notMatch expr="${bean.stringProperty}"
-							    location="end" value="FOO">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match expr="${bean.stringProperty}" location="end"
+                        value="FOO">
+            match
+        </logic-el:match>
+        <logic-el:notMatch expr="${bean.stringProperty}"
+                           location="end" value="FOO">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Property / Start</td>
     <td><c:out value="${bean.stringProperty}"/></td>
     <td>FOO</td>
     <td>starts with</td>
     <td>
-      <logic-el:match expr="${bean.stringProperty}"
-                      location="start" value="FOO">
-        match
-      </logic-el:match>
-      <logic-el:notMatch expr="${bean.stringProperty}"
-             location="start" value="FOO">
-        notMatch
-      </logic-el:notMatch>
+        <logic-el:match expr="${bean.stringProperty}"
+                        location="start" value="FOO">
+            match
+        </logic-el:match>
+        <logic-el:notMatch expr="${bean.stringProperty}"
+                           location="start" value="FOO">
+            notMatch
+        </logic-el:notMatch>
     </td>
-  </tr>
+</tr>
 </table>
 
 </body>

Modified: struts/el/trunk/web/exercise-taglib/logic-present.jsp
URL: http://svn.apache.org/viewcvs/struts/el/trunk/web/exercise-taglib/logic-present.jsp?rev=376788&r1=376787&r2=376788&view=diff
==============================================================================
--- struts/el/trunk/web/exercise-taglib/logic-present.jsp (original)
+++ struts/el/trunk/web/exercise-taglib/logic-present.jsp Fri Feb 10 10:27:39 2006
@@ -1,188 +1,190 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <%@ page language="java" %>
-<%@ taglib uri="http://struts.apache.org/tags-html-el"  prefix="html-el"  %>
-<%@ taglib uri="http://struts.apache.org/tags-bean-el"  prefix="bean-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <html-el:html>
 <head>
-<title>Test Struts presence tags and Replacements</title>
+    <title>Test Struts presence tags and Replacements</title>
 </head>
+
 <body bgcolor="white">
 
 <div align="center">
-<h1>Test Struts presence tags and Replacements</h1>
+    <h1>Test Struts presence tags and Replacements</h1>
 </div>
 
-<jsp:useBean id="bean" scope="page" class="org.apache.struts.webapp.exercise.TestBean"/>
+<jsp:useBean id="bean" scope="page"
+             class="org.apache.struts.webapp.exercise.TestBean"/>
 
 <table border="1">
-  <tr>
+<tr>
     <th>Test Type</th>
     <th>Correct Value</th>
     <th>Test Result</th>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Role</td>
     <td>notPresent</td>
     <td>
-      <logic-el:present role="fubar">
-        present
-      </logic-el:present>
-      <logic-el:notPresent role="fubar">
-        notPresent
-      </logic-el:notPresent>
+        <logic-el:present role="fubar">
+            present
+        </logic-el:present>
+        <logic-el:notPresent role="fubar">
+            notPresent
+        </logic-el:notPresent>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Bean</td>
     <td>present</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty bean}">
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty bean}">
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Bean</td>
     <td>notPresent</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty FOOBAR}">
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty FOOBAR}">
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Cookie</td>
     <td>
-    <c:choose>
-     <c:when test="${pageContext.request.requestedSessionIdFromCookie}">
-      present
-     </c:when>
-     <c:otherwise>
-      notPresent
-     </c:otherwise>
-    </c:choose>
-    </td>
-    <td>
-      <c:choose>
-       <c:when test='${not empty cookie["JSESSIONID"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${pageContext.request.requestedSessionIdFromCookie}">
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
+    </td>
+    <td>
+        <c:choose>
+            <c:when test='${not empty cookie["JSESSIONID"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Cookie</td>
     <td>notPresent</td>
     <td>
-      <c:choose>
-       <c:when test='${not empty cookie["FOOBAR"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test='${not empty cookie["FOOBAR"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Header</td>
     <td>present</td>
     <td>
-      <c:choose>
-       <c:when test='${not empty header["User-Agent"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test='${not empty header["User-Agent"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Header</td>
     <td>notPresent</td>
     <td>
-      <c:choose>
-       <c:when test='${not empty header["FOOBAR"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test='${not empty header["FOOBAR"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Parameter</td>
     <td>present</td>
     <td>
-      <c:choose>
-       <c:when test='${not empty param["param1"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test='${not empty param["param1"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Parameter</td>
     <td>notPresent</td>
     <td>
-      <c:choose>
-       <c:when test='${not empty param["FOOBAR"]}'>
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test='${not empty param["FOOBAR"]}'>
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Property</td>
     <td>present</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty bean.stringProperty}">
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty bean.stringProperty}">
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
-  <tr>
+</tr>
+<tr>
     <td>Property</td>
     <td>notPresent</td>
     <td>
-      <c:choose>
-       <c:when test="${not empty bean.nullProperty}">
-        present
-       </c:when>
-       <c:otherwise>
-        notPresent
-       </c:otherwise>
-      </c:choose>
+        <c:choose>
+            <c:when test="${not empty bean.nullProperty}">
+                present
+            </c:when>
+            <c:otherwise>
+                notPresent
+            </c:otherwise>
+        </c:choose>
     </td>
-  </tr>
+</tr>
 </table>
 
 </body>

Modified: struts/el/trunk/web/exercise-taglib/logic-redirect.jsp
URL: http://svn.apache.org/viewcvs/struts/el/trunk/web/exercise-taglib/logic-redirect.jsp?rev=376788&r1=376787&r2=376788&view=diff
==============================================================================
--- struts/el/trunk/web/exercise-taglib/logic-redirect.jsp (original)
+++ struts/el/trunk/web/exercise-taglib/logic-redirect.jsp Fri Feb 10 10:27:39 2006
@@ -1,47 +1,51 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <%@ page language="java" %>
-<%@ taglib uri="http://struts.apache.org/tags-html-el"  prefix="html-el"  %>
-<%@ taglib uri="http://struts.apache.org/tags-bean-el"  prefix="bean-el" %>
-<%@ taglib uri="http://struts.apache.org/tags-logic-el"  prefix="logic-el"  %>
+<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <c:if test='${not empty param["redirectType"]}'>
- <c:choose>
-  <c:when test='${param["redirectType"] eq "forward"}'>
-   <logic-el:redirect forward='${param["param1"]}'
-                      transaction="${!empty pageScope}"/>
-  </c:when>
-  <c:when test='${param["redirectType"] eq "href"}'>
-   <logic-el:redirect href='${param["param1"]}'/>
-  </c:when>
-  <c:when test='${param["redirectType"] eq "page"}'>
-   <logic-el:redirect page='${param["param1"]}'/>
-  </c:when>
- </c:choose>
+    <c:choose>
+        <c:when test='${param["redirectType"] eq "forward"}'>
+            <logic-el:redirect forward='${param["param1"]}'
+                               transaction="${!empty pageScope}"/>
+        </c:when>
+        <c:when test='${param["redirectType"] eq "href"}'>
+            <logic-el:redirect href='${param["param1"]}'/>
+        </c:when>
+        <c:when test='${param["redirectType"] eq "page"}'>
+            <logic-el:redirect page='${param["param1"]}'/>
+        </c:when>
+    </c:choose>
 </c:if>
 <html-el:html>
- <head>
-  <title>Test Struts &lt;logic:redirect&gt; tag</title>
- </head>
- <body>
-  <div align="center">
-   <h1>Test Struts &lt;logic:redirect&gt; tag</h1>
-  </div>
-  <table>
-   <tr>
-    <td>
-     Redirect with <html-el:link forward="redirectForward">Forward</html-el:link>
-    </td>
-   </tr>
-   <tr>
-    <td>
-     Redirect with <html-el:link forward="redirectHref">Href</html-el:link>
-    </td>
-   </tr>
-   <tr>
-    <td>
-     Redirect with <html-el:link forward="redirectPage">Page</html-el:link>
-    </td>
-   </tr>
-  </table>
- </body>
+    <head>
+        <title>Test Struts &lt;logic:redirect&gt; tag</title>
+    </head>
+
+    <body>
+    <div align="center">
+        <h1>Test Struts &lt;logic:redirect&gt; tag</h1>
+    </div>
+    <table>
+        <tr>
+            <td>
+                Redirect with <html-el:link forward="redirectForward">
+                Forward</html-el:link>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                Redirect with <html-el:link forward="redirectHref">
+                Href</html-el:link>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                Redirect with <html-el:link forward="redirectPage">
+                Page</html-el:link>
+            </td>
+        </tr>
+    </table>
+    </body>
 </html-el:html>

Modified: struts/el/trunk/web/exercise-taglib/showSource.jsp
URL: http://svn.apache.org/viewcvs/struts/el/trunk/web/exercise-taglib/showSource.jsp?rev=376788&r1=376787&r2=376788&view=diff
==============================================================================
--- struts/el/trunk/web/exercise-taglib/showSource.jsp (original)
+++ struts/el/trunk/web/exercise-taglib/showSource.jsp Fri Feb 10 10:27:39 2006
@@ -1,20 +1,21 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <%@ page language="java" %>
-<%@ taglib uri="http://struts.apache.org/tags-html-el"  prefix="html-el"  %>
-<%@ taglib uri="http://struts.apache.org/tags-bean-el"  prefix="bean-el"  %>
+<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <html-el:html>
- <head>
-  <title>Source for page: <c:out value="${param.path}"/></title>
- </head>
- <body>
-  <div align="center">
-   <h1>Source for page: <c:out value="${param.path}"/></h1>
-  </div>
-  <bean-el:resource id="pathSource" name="${param.path}"/>
-  <hr/>
-  <!-- Specifically avoiding newlines and spaces inside the "pre" tag. -->
-  <pre><c:out value="${pathSource}" escapeXml="true"/></pre>
-  <hr/>
- </body>
+    <head>
+        <title>Source for page: <c:out value="${param.path}"/></title>
+    </head>
+
+    <body>
+    <div align="center">
+        <h1>Source for page: <c:out value="${param.path}"/></h1>
+    </div>
+    <bean-el:resource id="pathSource" name="${param.path}"/>
+    <hr/>
+    <!-- Specifically avoiding newlines and spaces inside the "pre" tag. -->
+    <pre><c:out value="${pathSource}" escapeXml="true"/></pre>
+    <hr/>
+    </body>
 </html-el:html>



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