[Jboss-cvs] JBossAS SVN: r56129 - in trunk: testsuite/src/jdk15/org/jboss/test/jsf/webapp testsuite/src/main/org/jboss/test/web/test testsuite/src/resources/web/html/jsftest tomcat/src/main/org/jboss/web/jsf/integration/config
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 21 15:02:12 EDT 2006
Author: stan.silvert at jboss.com
Date: 2006-08-21 15:02:05 -0400 (Mon, 21 Aug 2006)
New Revision: 56129
Added:
trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/JBossColor.java
Modified:
trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/InjectionBean.java
trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/MySessionBean.java
trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
trunk/testsuite/src/resources/web/html/jsftest/index.jsp
trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
Log:
Test updates and changes based on Tomcat fixes in JBAS-3527.
Modified: trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/InjectionBean.java
===================================================================
--- trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/InjectionBean.java 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/InjectionBean.java 2006-08-21 19:02:05 UTC (rev 56129)
@@ -60,14 +60,13 @@
return this.postConstructCalled;
}
-
-
public boolean getDatasourceInjected() {
return this.datasourceInjected;
}
-
+
+ // TODO: test this annotation on a private method
@PostConstruct
- public void testPostConstruct() {
+ private void testPostConstruct() {
this.postConstructCalled = true;
Object dataSourceFromLookup = null;
@@ -105,4 +104,4 @@
this.defaultDS = dataSource;
}
-}
\ No newline at end of file
+}
Added: trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/JBossColor.java
===================================================================
--- trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/JBossColor.java 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/JBossColor.java 2006-08-21 19:02:05 UTC (rev 56129)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.webapp;
+
+/**
+ * Simple enumeration of colors.
+ *
+ * @author Stan Silvert
+ */
+public enum JBossColor {
+ RED, BLUE, ORANGE, GREEN, PURPLE, YELLOW, TEAL
+}
Modified: trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/MySessionBean.java
===================================================================
--- trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/MySessionBean.java 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/testsuite/src/jdk15/org/jboss/test/jsf/webapp/MySessionBean.java 2006-08-21 19:02:05 UTC (rev 56129)
@@ -34,6 +34,8 @@
private String[] numList = {"number one", "number two", "number three"};
private boolean preDestroyCalled = false;
+
+ private JBossColor color = JBossColor.PURPLE;
public boolean isPreDestroyCalled() {
return this.preDestroyCalled;
@@ -42,6 +44,14 @@
public void setPreDestroyCalled(boolean preDestroyCalled) {
this.preDestroyCalled = preDestroyCalled;
}
+
+ public JBossColor getColor() {
+ return this.color;
+ }
+
+ public void setColor(JBossColor color) {
+ this.color = color;
+ }
public String[] getNumList() {
return this.numList;
Modified: trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java 2006-08-21 19:02:05 UTC (rev 56129)
@@ -80,6 +80,9 @@
assertTrue(contains(responseBody, "number one"));
assertTrue(contains(responseBody, "number two"));
assertTrue(contains(responseBody, "number three"));
+
+ // Tests enum support
+ assertTrue(contains(responseBody, "JBoss Color selection is PURPLE"));
}
private boolean contains(String base, String target) {
Modified: trunk/testsuite/src/resources/web/html/jsftest/index.jsp
===================================================================
--- trunk/testsuite/src/resources/web/html/jsftest/index.jsp 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/testsuite/src/resources/web/html/jsftest/index.jsp 2006-08-21 19:02:05 UTC (rev 56129)
@@ -4,9 +4,6 @@
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -31,6 +28,15 @@
<c:forEach var="item" items="#{mySessionBean.numList}">
<h3><h:outputText value="#{item}"/></h3>
</c:forEach>
+
+ <font color="red"><h1>ServletContext Minor Version Test (should return 5)</h1></font>
+ <h3><h:outputText value="ServletContext.getMinorVersion() = #{application.minorVersion}"/></h3>
+
+ <font color="red"><h1>Enum Test</h1></font>
+ <h3><h:outputText rendered="#{mySessionBean.color == 'PURPLE'}"
+ value="JBoss Color selection is #{mySessionBean.color}"
+ /></h3>
</f:view>
+
</body>
</html>
Modified: trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java 2006-08-21 17:25:43 UTC (rev 56128)
+++ trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java 2006-08-21 19:02:05 UTC (rev 56129)
@@ -59,20 +59,6 @@
setLog4J();
}
- // TODO: This will be removed when Tomcat fixes a bug. For now,
- // if we don't preload JspRuntimeContext then the JSF RI will
- // get a NullPointerException when it tries to register a
- // ELResolver with JSP.
- try
- {
- Class.forName("org.apache.jasper.compiler.JspRuntimeContext");
- JspFactory.getDefaultFactory(); //make sure we can get the factory
- }
- catch (Exception e)
- {
- LOG.error("Unable to initialize Jasper JspRuntimeContext", e);
- }
-
super.contextInitialized(event);
}
More information about the jboss-cvs-commits
mailing list