You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2011/04/19 23:12:34 UTC

svn commit: r1095217 - in /geronimo/server/trunk/testsuite/aries-testsuite/simple: simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java simple-wab/pom.xml simple-wab/src/main/resources/test.jsp

Author: gawor
Date: Tue Apr 19 21:12:34 2011
New Revision: 1095217

URL: http://svn.apache.org/viewvc?rev=1095217&view=rev
Log:
added a test case to test WABs with basic JSPs

Added:
    geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp   (with props)
Modified:
    geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java
    geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/pom.xml

Modified: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java?rev=1095217&r1=1095216&r2=1095217&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java (original)
+++ geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-eba/src/test/java/org/apache/geronimo/testsuite/eba/EBATest.java Tue Apr 19 21:12:34 2011
@@ -31,11 +31,19 @@ public class EBATest extends TestSupport
 
     @Test
     public void testServlet() throws Exception {
-        checkReply("/SampleServlet");
+        String reply = getReply("/SampleServlet");
+        assertTrue("WAB Servlet", 
+                   reply.contains("Hello Web Application Bundle"));
     }
 
+    @Test
+    public void testJSP() throws Exception {
+        String reply = getReply("/test.jsp");
+        assertTrue("WAB JSP", 
+                   reply.contains("page request session application"));
+    }
 
-    private void checkReply(String address)
+    private String getReply(String address)
         throws Exception {
         String warName = System.getProperty("webAppName");
         assertNotNull(warName);
@@ -44,9 +52,7 @@ public class EBATest extends TestSupport
          * WABs are deployed asynchronously so it might take a
          * bit to actually invoke the servlet.
          */
-        String reply = doGET(url, 6, 10 * 1000);
-        assertTrue("WAB", 
-                   reply.contains("Hello Web Application Bundle"));
+        return doGET(url, 6, 10 * 1000);
     }
   
     private String doGET(URL url, int repeat, long delay) {

Modified: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/pom.xml?rev=1095217&r1=1095216&r2=1095217&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/pom.xml (original)
+++ geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/pom.xml Tue Apr 19 21:12:34 2011
@@ -60,6 +60,13 @@
                         <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                         <Private-Package>org.apache.geronimo.test.eba</Private-Package>
                         <Export-Package>!org.apache.geronimo.test.eba</Export-Package>
+                        <Import-Package>
+                            javax.servlet.jsp.el,
+                            javax.servlet.jsp,
+                            javax.servlet.jsp.tagext,
+                            javax.servlet.jsp.resources,
+                            *
+                        </Import-Package>
                     </instructions>
                 </configuration>
             </plugin>

Added: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp?rev=1095217&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp (added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp Tue Apr 19 21:12:34 2011
@@ -0,0 +1,28 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" trimDirectiveWhitespaces="true" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<html>
+<head><title>Hello JSP</title></head>
+<body>
+<c:set var="var1" value="page" scope="page"/>
+<c:set var="var2" value="request" scope="request"/>
+<c:set var="var3" value="session" scope="session"/>
+<c:set var="var4" value="application" scope="application"/>
+<c:out value='${pageScope.var1} ${requestScope.var2} ${sessionScope.var3} ${applicationScope.var4}' />
+</body>
+</html>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/simple/simple-wab/src/main/resources/test.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain