geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1079654 - in /geronimo/server/trunk/testsuite/deployment-testsuite: ./ url-binding-tests/ url-binding-tests/src/ url-binding-tests/src/main/ url-binding-tests/src/main/java/ url-binding-tests/src/main/java/org/ url-binding-tests/src/main/j...
Date Wed, 09 Mar 2011 03:45:55 GMT
Author: xiaming
Date: Wed Mar  9 03:45:54 2011
New Revision: 1079654

URL: http://svn.apache.org/viewvc?rev=1079654&view=rev
Log:
GERONIMO-5851 url binding demo and test, self-defined gbean used as well, patch provided by
LiWenQin

Added:
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml   (with
props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
  (with props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
  (with props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
  (with props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
  (with props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
  (with props)
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/
    geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
  (with props)
Modified:
    geronimo/server/trunk/testsuite/deployment-testsuite/pom.xml

Modified: geronimo/server/trunk/testsuite/deployment-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/pom.xml?rev=1079654&r1=1079653&r2=1079654&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/pom.xml (original)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/pom.xml Wed Mar  9 03:45:54 2011
@@ -42,6 +42,7 @@
         <module>deployment-tests</module>
         <module>jca-cms-tests</module>
         <module>manifestcp-tests</module>
+		<module>url-binding-tests</module>
     </modules>
 
 </project>

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml (added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml Wed Mar
 9 03:45:54 2011
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.apache.geronimo.testsuite</groupId>
+        <artifactId>deployment-testsuite</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>url-binding-tests</artifactId>
+	<packaging>war</packaging>
+	<name>Geronimo TestSuite :: Deployment Testsuite :: URLBinding Tests</name>
+    
+    <description>
+        Tests for the url binding.
+    </description>
+
+	    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-kernel</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-naming</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+		<dependency>
+            <!-- we need to include this in the image for logging to work -->
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+        </dependency>
+    </dependencies> 
+	
+	<build>
+		<plugins>
+			<plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-war-plugin</artifactId>
+                    <configuration>
+                        <archiveClasses>false</archiveClasses>
+                    </configuration>
+			</plugin>			
+		</plugins>
+	</build>
+
+	<profiles>
+    <profile>
+        <id>it</id>
+        <activation>
+            <property>
+                <name>it</name>
+            </property>
+        </activation>
+    <build>        
+        <plugins>   
+		    <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <configuration>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
+					</suiteXmlFiles>
+					<systemPropertyVariables>
+						<appContext>${project.artifactId}</appContext>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+				
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>geronimo-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>deploy-wars</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleArchive>${project.build.directory}/${pom.artifactId}-${pom.version}.war</moduleArchive>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>undeploy-war-as-moduleId</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>undeploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleId>${project.groupId}/${project.artifactId}/${project.version}/war</moduleId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    </profile>
+</profiles>
+</project>

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,59 @@
+/**
+ *  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.deployment.URLBinding;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.naming.ResourceSource;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class urlGBeanImpl implements ResourceSource {
+
+    private URL url;
+
+    public urlGBeanImpl(String url) {
+        try {
+            this.url = new URL(url);
+        } catch (MalformedURLException e) {
+            throw new IllegalArgumentException(url + " is not well-formated", e);
+        }
+    }
+
+    public Object $getResource() throws Throwable {
+        return url;
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(urlGBeanImpl.class,
"URLBinding");
+        infoFactory.addAttribute("url", String.class, true);
+        infoFactory.setConstructor(new String[] { "url" });
+
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/URLBinding/urlGBeanImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,80 @@
+/**
+ *  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.deployment.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class testServlet extends HttpServlet {
+    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException{
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        try {
+        	
+    		out.println("<html>");
+            out.println("<head>");
+            out.println("<title>urlBinding-test</title>");
+            out.println("</head>");
+            out.println("<body>");
+            out.println("<p>hello urlbinding</p>");
+            Context c = new InitialContext();
+    		if(c==null || c.equals(null)){
+    			out.println("Context is null.");
+    		}
+    		out.println("<p>"+c.lookup("jca:/org.apache.geronimo.testsuite/url-binding-tests/URLBinding/URLBindingA")+"</p>");
+    		out.println("</body>");
+            out.println("</html>");
+
+        }catch(NamingException e){
+        	e.printStackTrace();
+        }finally { 
+            out.close();
+        }
+    } 
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    } 
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+        processRequest(request, response);
+    }
+
+    @Override
+    public String getServletInfo() {
+        return "Short description";
+    }
+}

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/java/org/apache/geronimo/testsuite/deployment/servlet/testServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed 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.
+-->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" 
+         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2" 
+         xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
+         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+         
+  <sys:environment>
+    <sys:moduleId>
+      <sys:groupId>${project.groupId}</sys:groupId>
+      <sys:artifactId>${project.artifactId}</sys:artifactId>
+      <sys:version>${project.version}</sys:version>
+      <sys:type>car</sys:type>
+    </sys:moduleId>
+	<sys:dependencies>
+            <sys:dependency>
+               <sys:groupId>org.apache.geronimo.framework</sys:groupId>
+               <sys:artifactId>rmi-naming</sys:artifactId>
+           </sys:dependency>
+    </sys:dependencies>
+    <sys:hidden-classes/>
+    <sys:non-overridable-classes/>
+  </sys:environment>
+
+    <context-root>${project.artifactId}</context-root>
+	<gbean name="URLBindingA" class="org.apache.geronimo.testsuite.deployment.URLBinding.urlGBeanImpl">
+        <attribute name="url">http://geronimo.apache.org</attribute>
+    </gbean>
+</web-app>

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+    <welcome-file-list>
+        <welcome-file>
+            /testServlet
+        </welcome-file>
+    </welcome-file-list>
+   <servlet>
+        <servlet-name>testServlet</servlet-name>
+        <servlet-class>org.apache.geronimo.testsuite.deployment.servlet.testServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>testServlet</servlet-name>
+        <url-pattern>/testServlet</url-pattern>
+    </servlet-mapping>
+    <session-config>
+        <session-timeout>
+            30
+        </session-timeout>
+    </session-config>
+</web-app>

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,49 @@
+/**
+ *  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.deployment.test;
+
+import java.util.regex.*;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.methods.PostMethod;
+
+public class urlBindingTest {
+	@Test
+	public void test()throws Exception{
+		String contextRoot = System.getProperty("appContext");
+		HttpClient nclient = new HttpClient();
+		System.out.println("~~~~~~~~~~~~~~~~"+contextRoot);
+		String url = "http://localhost:8080/"+contextRoot+"/testServlet";
+		HttpMethodBase httpMethod;
+		httpMethod = new PostMethod(url);
+		int status = nclient.executeMethod(httpMethod);
+		Assert.assertEquals(200, status);
+		String result=null;
+		if(status==200){
+			String response = new String(httpMethod.getResponseBodyAsString().getBytes("8859_1"));
+			Assert.assertTrue(response.contains("http://geronimo.apache.org"));
+		}
+		httpMethod.releaseConnection();
+	}
+}

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/java/org/apache/geronimo/testsuite/deployment/test/urlBindingTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml?rev=1079654&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
(added)
+++ geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
Wed Mar  9 03:45:54 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+
+<suite name="Suite1" verbose="1">
+    <test name="deployment-testsuite.deployment">
+        <packages>
+            <package name="org.apache.geronimo.testsuite.deployment.test"/>
+        </packages>
+    </test>
+</suite>

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/deployment-testsuite/url-binding-tests/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message