You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by db...@apache.org on 2004/09/30 02:31:39 UTC

svn commit: rev 47522 - in geronimo/trunk/applications/magicGball: . src src/java src/java/org src/java/org/acme src/resources src/resources/client src/resources/client/META-INF src/resources/ear src/resources/ear/META-INF src/resources/ejb src/resources/ejb/META-INF src/webapp src/webapp/WEB-INF

Author: dblevins
Date: Wed Sep 29 17:31:39 2004
New Revision: 47522

Added:
   geronimo/trunk/applications/magicGball/
   geronimo/trunk/applications/magicGball/maven.xml
   geronimo/trunk/applications/magicGball/project.properties
   geronimo/trunk/applications/magicGball/project.xml
   geronimo/trunk/applications/magicGball/src/
   geronimo/trunk/applications/magicGball/src/java/
   geronimo/trunk/applications/magicGball/src/java/org/
   geronimo/trunk/applications/magicGball/src/java/org/acme/
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBall.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallBean.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallClient.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallHome.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocal.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocalHome.java
   geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallServlet.java
   geronimo/trunk/applications/magicGball/src/resources/
   geronimo/trunk/applications/magicGball/src/resources/client/
   geronimo/trunk/applications/magicGball/src/resources/client/META-INF/
   geronimo/trunk/applications/magicGball/src/resources/client/META-INF/application-client.xml
   geronimo/trunk/applications/magicGball/src/resources/ear/
   geronimo/trunk/applications/magicGball/src/resources/ear/META-INF/
   geronimo/trunk/applications/magicGball/src/resources/ear/META-INF/application.xml
   geronimo/trunk/applications/magicGball/src/resources/ejb/
   geronimo/trunk/applications/magicGball/src/resources/ejb/META-INF/
   geronimo/trunk/applications/magicGball/src/resources/ejb/META-INF/ejb-jar.xml
   geronimo/trunk/applications/magicGball/src/webapp/
   geronimo/trunk/applications/magicGball/src/webapp/WEB-INF/
   geronimo/trunk/applications/magicGball/src/webapp/WEB-INF/web.xml
Log:
The mystical Magic G Ball (tm).  Ask it a question and the truth is revealed!



Added: geronimo/trunk/applications/magicGball/maven.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/maven.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Rev: 45928 $ $Date: 2004-09-11 17:03:39 -0700 (Sat, 11 Sep 2004) $ -->
+
+<project default="default"
+    xmlns:j="jelly:core"
+    xmlns:u="jelly:util"
+    xmlns:ant="jelly:ant">
+
+    <goal name="default" prereqs="ear"/>
+    <goal name="build" prereqs="default"/>
+
+    <goal name="rebuild" prereqs="clean,build"/>
+
+    <goal name="ejb" prereqs="java:compile">
+        <ant:jar destfile="target/${pom.artifactId}-ejb.jar">
+            <fileset dir="target/classes">
+                <exclude name="**/*Servlet.class"/>
+                <exclude name="**/*Client.class"/>
+            </fileset>
+            <fileset dir="src/resources/ejb"/>
+        </ant:jar>
+    </goal>
+
+     <goal name="client" prereqs="java:compile">
+        <ant:jar destfile="target/${pom.artifactId}-client.jar">
+            <fileset dir="target/classes">
+                <include name="**/*Client.class"/>
+                <include name="**/MagicGBall.class"/>
+                <include name="**/MagicGBallHome.class"/>
+            </fileset>
+            <fileset dir="src/resources/client"/>
+            <manifest>
+                <attribute name="Main-Class" value="org.acme.MagicGBallClient"/>
+            </manifest>
+        </ant:jar>
+    </goal>
+
+    <goal name="ear" prereqs="ejb,war:war,client">
+        <ant:jar destfile="target/${pom.artifactId}.ear">
+            <fileset dir="target">
+                <include name="${pom.artifactId}-ejb.jar"/>
+                <include name="${pom.artifactId}-client.jar"/>
+                <include name="${pom.artifactId}.war"/>
+            </fileset>
+            <fileset dir="src/resources/ear"/>
+        </ant:jar>
+    </goal>
+</project>

Added: geronimo/trunk/applications/magicGball/project.properties
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/project.properties	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,18 @@
+#    Copyright 2004 The Apache Software Foundation
+#
+#    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.
+
+maven.multiproject.type=war
+maven.final.name=${pom.artifactId}
+maven.war.classes.includes=**/*Servlet.class
+

Added: geronimo/trunk/applications/magicGball/project.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/project.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    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.
+-->
+
+<!-- $Rev: 45928 $ $Date: 2004-09-11 17:03:39 -0700 (Sat, 11 Sep 2004) $ -->
+
+<project>
+    <pomVersion>3</pomVersion>
+
+    <!-- ===================== -->
+    <!-- Module Identification -->
+    <!-- ===================== -->
+
+    <name>The Magic G Ball</name>
+    <id>magicGball</id>
+    <currentVersion>0.01234-alpha0</currentVersion>
+
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+
+    <dependencies>
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee</artifactId>
+            <version>1.4-rc2</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/java</sourceDirectory>
+        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+        <resources>
+            <resource>
+                <directory>${basedir}/src/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                    <include>**/*.defaults</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+</project>

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBall.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBall.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,26 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+/**
+ * Remote interface for Enterprise Bean: MagicGBall
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public interface MagicGBall extends javax.ejb.EJBLocalObject {
+	public String ask(String question) throws java.rmi.RemoteException;
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallBean.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallBean.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,65 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+/**
+ * Bean implementation class for Enterprise Bean: MagicGBall
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public class MagicGBallBean implements javax.ejb.SessionBean {
+
+	private static final String[] answers = {"It is certain","Outlook not so good","You may rely on it","My Sources say no","It is decidedly so", "Rephrase and ask again","Most likely","Don't count on it","Yes definitely","Very doubtful"}; 
+
+	public String ask(String question){
+		return answers[Math.abs(question.hashCode()) % answers.length];
+	}
+	
+	private javax.ejb.SessionContext mySessionCtx;
+	/**
+	 * getSessionContext
+	 */
+	public javax.ejb.SessionContext getSessionContext() {
+		return mySessionCtx;
+	}
+	/**
+	 * setSessionContext
+	 */
+	public void setSessionContext(javax.ejb.SessionContext ctx) {
+		mySessionCtx = ctx;
+	}
+	/**
+	 * ejbCreate
+	 */
+	public void ejbCreate() throws javax.ejb.CreateException {
+	}
+	/**
+	 * ejbActivate
+	 */
+	public void ejbActivate() {
+	}
+	/**
+	 * ejbPassivate
+	 */
+	public void ejbPassivate() {
+	}
+	/**
+	 * ejbRemove
+	 */
+	public void ejbRemove() {
+	}
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallClient.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallClient.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,50 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+/**
+ * Run this app client from the command line and pass in a question as an argument.
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public class MagicGBallClient {
+    public static void main(String[] args) throws Exception{
+        if (args.length < 1){
+            System.err.println("Please ask a question");
+            System.exit(-1);
+        }
+
+        MagicGBallClient magicGBallClient = new MagicGBallClient();
+        for (int i = 0; i < args.length; i++) {
+            magicGBallClient.ask(args[i]);
+        }
+    }
+    
+	public void ask(String question) throws Exception {
+        Context ctx = new InitialContext();
+        MagicGBallHome ejbHome = (MagicGBallHome) ctx.lookup("java:comp/env/mGball");
+        MagicGBall m8ball = ejbHome.create();
+        String answer = m8ball.ask(question);
+
+        System.out.println(answer);
+	}
+
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallHome.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallHome.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,29 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+/**
+ * Home interface for Enterprise Bean: MagicGBall
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public interface MagicGBallHome extends javax.ejb.EJBLocalHome {
+	/**
+	 * Creates a default instance of Session Bean: MagicGBall
+	 */
+	public MagicGBall create() throws javax.ejb.CreateException, java.rmi.RemoteException;;
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocal.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocal.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,26 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+/**
+ * Local interface for Enterprise Bean: MagicGBall
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public interface MagicGBallLocal extends javax.ejb.EJBLocalObject {
+	public String ask(String question);
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocalHome.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallLocalHome.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,29 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+
+package org.acme;
+/**
+ * Local Home interface for Enterprise Bean: MagicGBall
+ * 
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public interface MagicGBallLocalHome extends javax.ejb.EJBLocalHome {
+	/**
+	 * Creates a default instance of Session Bean: MagicGBall
+	 */
+	public org.acme.MagicGBallLocal create() throws javax.ejb.CreateException;
+}

Added: geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallServlet.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/java/org/acme/MagicGBallServlet.java	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,62 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  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.
+ */
+package org.acme;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.ejb.CreateException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Run this servlet
+ *
+ * @version $Rev: 46301 $ $Date: 2004-09-18 13:03:59 -0700 (Sat, 18 Sep 2004) $
+ */
+public class MagicGBallServlet extends HttpServlet {
+
+	public MagicGBallServlet() {
+		super();
+	}
+
+	protected void service(HttpServletRequest req, HttpServletResponse res)
+		throws ServletException, IOException {
+		try {
+			Context ctx = new InitialContext();
+			MagicGBallLocalHome ejbHome = (MagicGBallLocalHome) ctx.lookup("java:comp/env/mGball");
+			MagicGBallLocal m8ball = ejbHome.create();
+			String question = req.getParameter("question");
+			String answer = m8ball.ask(question);
+			
+			PrintWriter out = res.getWriter();
+			out.print(answer);
+		} catch (NamingException e) {
+			e.printStackTrace();
+		} catch (CreateException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

Added: geronimo/trunk/applications/magicGball/src/resources/client/META-INF/application-client.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/resources/client/META-INF/application-client.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,21 @@
+<?xml version="1.0"?> 
+
+<!--DOCTYPE application-client PUBLIC 
+    "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" 
+    "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"--> 
+    
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/applicationclient_1_4.xsd"
+    version="1.4">
+
+    <display-name>Magic G Ball</display-name>
+	<ejb-ref>
+		<ejb-ref-name>mGball</ejb-ref-name>
+		<ejb-ref-type>Session</ejb-ref-type>
+		<home>org.acme.MagicGBallHome</home>
+		<remote>org.acme.MagicGBall</remote>
+		<ejb-link>magicGball-ejb.jar#MagicGBall</ejb-link>
+	</ejb-ref>
+</application-client>
+

Added: geronimo/trunk/applications/magicGball/src/resources/ear/META-INF/application.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/resources/ear/META-INF/application.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<application>
+	<display-name>MagicGBall</display-name>
+	<module>
+		<ejb>magicGball-ejb.jar</ejb>
+	</module>
+	<module>
+		<web>
+			<web-uri>magicGball.war</web-uri>
+			<context-root>magicGball</context-root>
+		</web>
+	</module>
+	<module>
+		<java>magicGball-client.jar</java>
+	</module>
+</application>

Added: geronimo/trunk/applications/magicGball/src/resources/ejb/META-INF/ejb-jar.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/resources/ejb/META-INF/ejb-jar.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<ejb-jar>
+	<display-name>MagicGBallEJB</display-name>
+	<enterprise-beans>
+		<session id="MagicGBall">
+			<ejb-name>MagicGBall</ejb-name>
+			<home>org.acme.MagicGBallHome</home>
+			<remote>org.acme.MagicGBall</remote>
+			<local-home>org.acme.MagicGBallLocalHome</local-home>
+			<local>org.acme.MagicGBallLocal</local>
+			<ejb-class>org.acme.MagicGBallBean</ejb-class>
+			<session-type>Stateless</session-type>
+			<transaction-type>Container</transaction-type>
+		</session>
+	</enterprise-beans>
+</ejb-jar>

Added: geronimo/trunk/applications/magicGball/src/webapp/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/applications/magicGball/src/webapp/WEB-INF/web.xml	Wed Sep 29 17:31:39 2004
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app id="MagicGBallWeb">
+	<display-name>MagicGBallWeb</display-name>
+	<servlet>
+        <servlet-name>MagicGBallServlet</servlet-name>
+		<display-name>MagicGBallServlet</display-name>
+        <servlet-class>org.acme.MagicGBallServlet</servlet-class>
+	</servlet>
+	<servlet-mapping>
+        <servlet-name>MagicGBallServlet</servlet-name>
+		<url-pattern>/ask</url-pattern>
+	</servlet-mapping>
+	<welcome-file-list>
+		<welcome-file>index.html</welcome-file>
+		<welcome-file>index.htm</welcome-file>
+		<welcome-file>index.jsp</welcome-file>
+	</welcome-file-list>
+	<ejb-local-ref>
+		<ejb-ref-name>mGball</ejb-ref-name>
+		<ejb-ref-type>Session</ejb-ref-type>
+		<local-home>org.acme.MagicGBallLocalHome</local-home>
+		<local>org.acme.MagicGBallLocal</local>
+		<ejb-link>magicGball-ejb.jar#MagicGBall</ejb-link>
+	</ejb-local-ref>
+</web-app>