geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r905522 - in /geronimo/server/trunk/testsuite/web-testsuite/test-tld: test-tld-jar/ test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/ test-tld-jar/src/main/resources/META-INF/ test-tld-war/src/main/webapp/
Date Tue, 02 Feb 2010 05:43:57 GMT
Author: gawor
Date: Tue Feb  2 05:43:45 2010
New Revision: 905522

URL: http://svn.apache.org/viewvc?rev=905522&view=rev
Log:
GERONIMO-5051: add context listener to test discovery of tlds and registration of its listeners

Added:
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
  (with props)
Modified:
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/pom.xml
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/resources/META-INF/embedded.tld
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/main/webapp/testTaglibs.jsp

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/pom.xml?rev=905522&r1=905521&r2=905522&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/pom.xml (original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/pom.xml Tue Feb  2
05:43:45 2010
@@ -40,6 +40,11 @@
             <artifactId>geronimo-jsp_2.2_spec</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
 </project>

Added: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java?rev=905522&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
(added)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
Tue Feb  2 05:43:45 2010
@@ -0,0 +1,34 @@
+/**
+ *  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.
+ */
+
+package org.apache.geronimo.testsuite.taglib;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class TestListener implements ServletContextListener {
+
+    public void contextInitialized(ServletContextEvent event) {
+        System.out.println("Context initialized");
+        event.getServletContext().setAttribute("listener", "true");
+    }
+
+    public void contextDestroyed(ServletContextEvent event) {
+        System.out.println("Context destroyed");
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/java/org/apache/geronimo/testsuite/taglib/TestListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/resources/META-INF/embedded.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/resources/META-INF/embedded.tld?rev=905522&r1=905521&r2=905522&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/resources/META-INF/embedded.tld
(original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-jar/src/main/resources/META-INF/embedded.tld
Tue Feb  2 05:43:45 2010
@@ -22,6 +22,11 @@
     <jspversion>2.1</jspversion>
     <shortname>testtaglib</shortname>
     <uri>http://geronimo.apache.org/jar</uri>
+
+    <listener>
+        <listener-class>org.apache.geronimo.testsuite.taglib.TestListener</listener-class>
+    </listener>
+
     <tag>
        <name>jar</name>
        <tagclass>org.apache.geronimo.testsuite.taglib.TestTag</tagclass>

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/main/webapp/testTaglibs.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/main/webapp/testTaglibs.jsp?rev=905522&r1=905521&r2=905522&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/main/webapp/testTaglibs.jsp
(original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/main/webapp/testTaglibs.jsp
Tue Feb  2 05:43:45 2010
@@ -22,7 +22,11 @@
 <head><title>test</title></head>
 <body>
 <localns:local/>
+<br/>
 <webns:web/>
+<br/>
 <jarns:jar/>
+<br/>
+Listener initialized: <%= getServletContext().getAttribute("listener") %>
 </body>
 </html>



Mime
View raw message