[jboss-cvs] JBossAS SVN: r77951 - in trunk/testsuite: src/main/org/jboss/test/jsf and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 4 05:18:12 EDT 2008
Author: emuckenhuber
Date: 2008-09-04 05:18:12 -0400 (Thu, 04 Sep 2008)
New Revision: 77951
Added:
trunk/testsuite/src/main/org/jboss/test/web/ejb3/
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java
trunk/testsuite/src/main/org/jboss/test/web/test/JSPAnnotationENCUnitTestCase.java
trunk/testsuite/src/resources/web/jspinjection/META-INF/
trunk/testsuite/src/resources/web/jspinjection/META-INF/application.xml
trunk/testsuite/src/resources/web/jspinjection/nested.jsp
trunk/testsuite/src/resources/web/jspinjection/simple.jsp
Removed:
trunk/testsuite/src/main/org/jboss/test/jsf/ejb/
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java
trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java
Modified:
trunk/testsuite/imports/sections/jsf.xml
trunk/testsuite/imports/sections/web.xml
trunk/testsuite/src/main/org/jboss/test/jsf/managed/SimpleManagedBean.java
trunk/testsuite/src/main/org/jboss/test/web/test/EncAnnotationsUnitTestCase.java
Log:
[JBAS-5673] testcase for jsp injection
Modified: trunk/testsuite/imports/sections/jsf.xml
===================================================================
--- trunk/testsuite/imports/sections/jsf.xml 2008-09-04 09:16:08 UTC (rev 77950)
+++ trunk/testsuite/imports/sections/jsf.xml 2008-09-04 09:18:12 UTC (rev 77951)
@@ -79,7 +79,7 @@
<jar destfile="${build.lib}/jbosstest-jsf-ejbs.jar">
<fileset dir="${build.classes}">
- <include name="org/jboss/test/jsf/ejb/**"/>
+ <include name="org/jboss/test/web/ejb3/**"/>
</fileset>
</jar>
Modified: trunk/testsuite/imports/sections/web.xml
===================================================================
--- trunk/testsuite/imports/sections/web.xml 2008-09-04 09:16:08 UTC (rev 77950)
+++ trunk/testsuite/imports/sections/web.xml 2008-09-04 09:18:12 UTC (rev 77951)
@@ -676,6 +676,13 @@
<include name="**/*.jsp"/>
</fileset>
</war>
+ <ear earfile="${build.lib}/jbosstest-jsp-injection.ear"
+ appxml="${build.resources}/web/jspinjection/META-INF/application.xml">
+ <fileset dir="${build.lib}">
+ <include name="jbosstest-jsf-ejbs.jar"/>
+ <include name="simple-jsponly.war"/>
+ </fileset>
+ </ear>
<!-- Simple war for testing web app enc setup using annotations -->
<war destfile="${build.lib}/simple-annonly.war"
webxml="${build.resources}/web/simple-xmlonly/annotated-web.xml">
Modified: trunk/testsuite/src/main/org/jboss/test/jsf/managed/SimpleManagedBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/managed/SimpleManagedBean.java 2008-09-04 09:16:08 UTC (rev 77950)
+++ trunk/testsuite/src/main/org/jboss/test/jsf/managed/SimpleManagedBean.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -27,8 +27,8 @@
import javax.ejb.EJB;
import javax.faces.FacesException;
-import org.jboss.test.jsf.ejb.SimpleStateful;
-import org.jboss.test.jsf.ejb.SimpleStateless;
+import org.jboss.test.web.ejb3.SimpleStateful;
+import org.jboss.test.web.ejb3.SimpleStateless;
/**
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
Copied: trunk/testsuite/src/main/org/jboss/test/web/ejb3 (from rev 77772, trunk/testsuite/src/main/org/jboss/test/jsf/ejb)
Deleted: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStateful.java 2008-09-02 07:38:42 UTC (rev 77772)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jsf.ejb;
-
-import javax.ejb.Remote;
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at Remote
-public interface SimpleStateful
-{
-
- boolean doSomething();
-
-}
-
Copied: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java (from rev 77948, trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStateful.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateful.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.ejb3;
+
+import javax.ejb.Remote;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at Remote
+public interface SimpleStateful
+{
+
+ boolean doSomething();
+
+}
+
Deleted: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStatefulBean.java 2008-09-02 07:38:42 UTC (rev 77772)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jsf.ejb;
-
-import javax.ejb.Stateless;
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at Stateless(name = "SimpleStatefulBean", mappedName = "simpleStatefulMappedName")
-public class SimpleStatefulBean implements SimpleStateful
-{
-
- public boolean doSomething()
- {
- // do something...
- return true;
- }
-
-}
-
Copied: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java (from rev 77948, trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStatefulBean.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatefulBean.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.ejb3;
+
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at Stateless(name = "SimpleStatefulBean", mappedName = "simpleStatefulMappedName")
+public class SimpleStatefulBean implements SimpleStateful
+{
+
+ public boolean doSomething()
+ {
+ // do something...
+ return true;
+ }
+
+}
+
Deleted: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStateless.java 2008-09-02 07:38:42 UTC (rev 77772)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jsf.ejb;
-
-import javax.ejb.Remote;
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at Remote
-public interface SimpleStateless
-{
-
- boolean doSomething();
-
-}
-
Copied: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java (from rev 77948, trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStateless.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStateless.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.ejb3;
+
+import javax.ejb.Remote;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at Remote
+public interface SimpleStateless
+{
+
+ boolean doSomething();
+
+}
+
Deleted: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStatelessBean.java 2008-09-02 07:38:42 UTC (rev 77772)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jsf.ejb;
-
-import javax.ejb.Stateless;
-
-/**
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
- at Stateless
-public class SimpleStatelessBean implements SimpleStateless
-{
-
- public boolean doSomething()
- {
- return true;
- }
-
-}
-
Copied: trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java (from rev 77948, trunk/testsuite/src/main/org/jboss/test/jsf/ejb/SimpleStatelessBean.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/ejb3/SimpleStatelessBean.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.ejb3;
+
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at Stateless
+public class SimpleStatelessBean implements SimpleStateless
+{
+
+ public boolean doSomething()
+ {
+ return true;
+ }
+
+}
+
Modified: trunk/testsuite/src/main/org/jboss/test/web/test/EncAnnotationsUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/EncAnnotationsUnitTestCase.java 2008-09-04 09:16:08 UTC (rev 77950)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/EncAnnotationsUnitTestCase.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -41,7 +41,7 @@
public static Test suite() throws Exception
{
- return getDeploySetup(EncAnnotationsUnitTestCase.class, "simple-mock.beans,simple-annonly.war,simple-jsponly.war");
+ return getDeploySetup(EncAnnotationsUnitTestCase.class, "simple-mock.beans,simple-annonly.war");
}
public EncAnnotationsUnitTestCase(String name)
@@ -60,16 +60,4 @@
log.info("X-Exception: "+errors);
assertTrue("X-Exception("+errors+") is null", errors == null);
}
-
- /**
- * Access a simple annotated jsp.
- *
- * @throws Exception
- */
- public void testJSPAnnotations() throws Exception
- {
- URL url = new URL(baseURL+"simple-jsponly/enc.jsp");
- HttpUtils.accessURL(url);
- }
-
}
Added: trunk/testsuite/src/main/org/jboss/test/web/test/JSPAnnotationENCUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/JSPAnnotationENCUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/JSPAnnotationENCUnitTestCase.java 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.web.test;
+
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.web.HttpUtils;
+
+/**
+ * Test the ejb and resource injection in a annotated-only jsp
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class JSPAnnotationENCUnitTestCase extends JBossTestCase
+{
+ private String baseURL = HttpUtils.getBaseURL();
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(JSPAnnotationENCUnitTestCase.class, "simple-mock.beans,jbosstest-jsp-injection.ear");
+ }
+
+ public JSPAnnotationENCUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Access a simple annotated jsp.
+ *
+ * @throws Exception
+ */
+ public void testJSPAnnotations() throws Exception
+ {
+ URL url = new URL(baseURL+"simple-jsponly/enc.jsp");
+ HttpUtils.accessURL(url);
+ }
+
+ /**
+ * Access a simple annotated jsp.
+ *
+ * @throws Exception
+ */
+ public void testSimpleEjbJSPAnnotations() throws Exception
+ {
+ URL url = new URL(baseURL+"simple-jsponly/simple.jsp");
+ HttpUtils.accessURL(url);
+ }
+
+ /**
+ * Access a nested annotated class in a jsp.
+ *
+ * @throws Exception
+ */
+ public void testNestedEjbJSPAnnotations() throws Exception
+ {
+ URL url = new URL(baseURL+"simple-jsponly/nested.jsp");
+ HttpUtils.accessURL(url);
+ }
+
+}
+
Added: trunk/testsuite/src/resources/web/jspinjection/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/web/jspinjection/META-INF/application.xml (rev 0)
+++ trunk/testsuite/src/resources/web/jspinjection/META-INF/application.xml 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,21 @@
+<?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>JBossTest Web JSP Injection</display-name>
+
+ <module>
+ <!-- reuse the jsf-ejbs.jar -->
+ <ejb>jbosstest-jsf-ejbs.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>simple-jsponly.war</web-uri>
+ <context-root>/simple-jsponly</context-root>
+ </web>
+ </module>
+</application>
+
Added: trunk/testsuite/src/resources/web/jspinjection/nested.jsp
===================================================================
--- trunk/testsuite/src/resources/web/jspinjection/nested.jsp (rev 0)
+++ trunk/testsuite/src/resources/web/jspinjection/nested.jsp 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,58 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@page import="java.net.URL"%>
+<%@page import="javax.ejb.EJB"%>
+<%@page import="org.jboss.test.web.ejb3.SimpleStateful"%>
+<%@page import="org.jboss.test.web.ejb3.SimpleStateless"%>
+<%@page import="javax.annotation.Resource"%>
+
+<%!
+ public static class Nested
+ {
+
+ @EJB
+ SimpleStateful stateful;
+
+ SimpleStateless stateless;
+
+ @Resource(name = "url/myHome", mappedName = "http://www.jboss.org")
+ URL url;
+
+ public Nested()
+ {
+ super();
+ }
+
+ public URL getUrl()
+ {
+ return this.url;
+ }
+
+ public SimpleStateful getSimpleStateful()
+ {
+ return this.stateful;
+ }
+
+ public SimpleStateless getSimpleStateless()
+ {
+ return this.stateless;
+ }
+
+ @EJB
+ public void setSimpleStateless(SimpleStateless stateless)
+ {
+ this.stateless = stateless;
+ }
+ }
+%>
+<%
+ Nested nested = new Nested();
+
+ assert nested.getSimpleStateful() != null : "Nested.stateful is null";
+ assert nested.getSimpleStateful().doSomething() == true : "Nested.stateful returned false";
+ assert nested.getSimpleStateless() != null : "Nested.stateless is null";
+ assert nested.getSimpleStateless().doSomething() == true : "Nested.stateless returned false";
+ assert nested.getUrl() != null : "Nested.url is not injected";
+
+%>
+tests passed.
\ No newline at end of file
Added: trunk/testsuite/src/resources/web/jspinjection/simple.jsp
===================================================================
--- trunk/testsuite/src/resources/web/jspinjection/simple.jsp (rev 0)
+++ trunk/testsuite/src/resources/web/jspinjection/simple.jsp 2008-09-04 09:18:12 UTC (rev 77951)
@@ -0,0 +1,21 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@page import="javax.ejb.EJB"%>
+<%@page import="org.jboss.test.web.ejb3.SimpleStateful"%>
+<%@page import="org.jboss.test.web.ejb3.SimpleStateless"%>
+<%!
+ at EJB(mappedName = "simpleStatefulMappedName")
+private SimpleStateful simpleStateful;
+
+ at EJB
+private SimpleStateless simpleStateless;
+%>
+<%
+assert simpleStateful != null : "simpleStateful is null";
+assert simpleStateless != null : "simpleStateless is null";
+
+assert simpleStateful.doSomething() == true : "simpleStateful returned false";
+assert simpleStateless.doSomething() == true : "simpleStateless returned false";
+
+%>
+tests passed.
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list