You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/05/27 02:43:55 UTC

svn commit: r948644 - in /tomcat/trunk/test: org/apache/el/TestELInJsp.java webapp-3.0/WEB-INF/tags/echo-deferred.tag webapp-3.0/el-method.jsp

Author: markt
Date: Thu May 27 00:43:54 2010
New Revision: 948644

URL: http://svn.apache.org/viewvc?rev=948644&view=rev
Log:
Extend to test deferred expressions. Need to use request scope attributes since page scope ones won't be visible to the tag file when evaluating the deferred expressions.

Modified:
    tomcat/trunk/test/org/apache/el/TestELInJsp.java
    tomcat/trunk/test/webapp-3.0/WEB-INF/tags/echo-deferred.tag
    tomcat/trunk/test/webapp-3.0/el-method.jsp

Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELInJsp.java?rev=948644&r1=948643&r2=948644&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/el/TestELInJsp.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELInJsp.java Thu May 27 00:43:54 2010
@@ -385,6 +385,9 @@ public class TestELInJsp extends TomcatB
         assertEcho(result, "00-Hello JUnit from Tomcat");
         assertEcho(result, "01-Hello JUnit from Tomcat");
         assertEcho(result, "02-Hello JUnit from Tomcat");
+        assertEcho(result, "03-Hello JUnit from Tomcat");
+        assertEcho(result, "04-Hello JUnit from Tomcat");
+        assertEcho(result, "05-Hello JUnit from Tomcat");
     }
 
     // Assertion for text contained with <p></p>, e.g. printed by tags:echo 

Modified: tomcat/trunk/test/webapp-3.0/WEB-INF/tags/echo-deferred.tag
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/WEB-INF/tags/echo-deferred.tag?rev=948644&r1=948643&r2=948644&view=diff
==============================================================================
--- tomcat/trunk/test/webapp-3.0/WEB-INF/tags/echo-deferred.tag (original)
+++ tomcat/trunk/test/webapp-3.0/WEB-INF/tags/echo-deferred.tag Thu May 27 00:43:54 2010
@@ -13,6 +13,5 @@
   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.
---%>
-<%@ tag %><%@ attribute name="echo" deferredValue="true" %><%@
+--%><%@ tag %><%@ attribute name="echo" deferredValue="true" %><%@
 tag body-content="empty" %><p>${echo}</p>
\ No newline at end of file

Modified: tomcat/trunk/test/webapp-3.0/el-method.jsp
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/el-method.jsp?rev=948644&r1=948643&r2=948644&view=diff
==============================================================================
--- tomcat/trunk/test/webapp-3.0/el-method.jsp (original)
+++ tomcat/trunk/test/webapp-3.0/el-method.jsp Thu May 27 00:43:54 2010
@@ -25,11 +25,14 @@
     TesterBeanB beanB = new TesterBeanB();
     beanB.setName("Tomcat");
     beanA.setBean(beanB);
-    pageContext.setAttribute("testBeanA", beanA);
-    pageContext.setAttribute("testBeanB", beanB);
+    pageContext.setAttribute("testBeanA", beanA, PageContext.REQUEST_SCOPE);
+    pageContext.setAttribute("testBeanB", beanB, PageContext.REQUEST_SCOPE);
     %>
     <tags:echo echo="00-${testBeanA[\"bean\"].sayHello('JUnit')}" />
     <tags:echo echo="01-${testBeanA.bean.sayHello('JUnit')}" />
     <tags:echo echo="02-${testBeanB.sayHello('JUnit')}" />
+    <tags:echo-deferred echo="03-#{testBeanA[\"bean\"].sayHello('JUnit')}" />
+    <tags:echo-deferred echo="04-#{testBeanA.bean.sayHello('JUnit')}" />
+    <tags:echo-deferred echo="05-#{testBeanB.sayHello('JUnit')}" />
   </body>
 </html>
\ No newline at end of file



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