[jboss-cvs] jbosstest/src/resources/web/html/jsftest ...

Stan Silvert ssilvert at jboss.com
Wed Jul 19 17:28:45 EDT 2006


  User: ssilvert
  Date: 06/07/19 17:28:45

  Added:       src/resources/web/html/jsftest  index.jsp
  Log:
  Updated JSF and JSTL version.  Added test for JSF and JSTL integration.
  
  Revision  Changes    Path
  1.2       +36 -0     jbosstest/src/resources/web/html/jsftest/index.jsp
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: index.jsp
  ===================================================================
  RCS file: index.jsp
  diff -N index.jsp
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ index.jsp	19 Jul 2006 21:28:45 -0000	1.2
  @@ -0,0 +1,36 @@
  +<%@page contentType="text/html"%>
  +<%@page pageEncoding="UTF-8"%>
  +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
  +<%@ 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">
  +        <title>JBoss JSF Integration Test</title>
  +    </head>
  +    <body>
  +
  +     <f:view>
  +         <font color="red"><h1><h:outputText value="#{injectionBean.name}: hit this page twice to complete the test."/></h1></font>
  +         <h3><h:outputText rendered="#{injectionBean.postConstructCalled}" value="@PostConstruct was called."/></h3>
  +         <h3><h:outputText rendered="#{mySessionBean.preDestroyCalled}" value="@PreDestroy was called."/></h3>
  +         <h3><h:outputText rendered="#{injectionBean.datasourceInjected}" value="Datasource was injected."/></h3>
  +         
  +         <%
  +               // I think that the fact I need to do this constitutes a bug in JSTL
  +               if (session.getAttribute("mySessionBean") == null) {
  +                    session.setAttribute("mySessionBean", new org.jboss.test.jsf.webapp.MySessionBean()); 
  +               }
  +          %>
  +          
  +         <font color="red"><h1>Classic test of JSTL 1.2/JSF 1.2 with deferred expressions:</h1></font>
  +         <c:forEach var="item" items="#{mySessionBean.numList}">
  +             <h3><h:outputText value="#{item}"/></h3>
  +         </c:forEach>
  +     </f:view>
  +    </body>
  +</html>
  
  
  



More information about the jboss-cvs-commits mailing list