Initialer Commit

This commit is contained in:
2026-03-18 21:52:19 +01:00
commit f4377bb347
584 changed files with 43636 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<capabilities>
<capability name="Facelets">
<library name="facelets" />
<conflicting-library name="jsf-facelets.jar"/>
<file-addition file-name="/WEB-INF/web.xml"
label="Refresh Period Parameter" x-path="/web-app">
<![CDATA[<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>]]>
</file-addition>
<file-addition file-name="/WEB-INF/web.xml"
label="Default Sufix Parameter" x-path="/web-app">
<![CDATA[<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>]]>
</file-addition>
<file-addition file-name="/WEB-INF/faces-config.xml"
label="View Handler" x-path="/faces-config/application">
<![CDATA[<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>]]>
</file-addition>
</capability>
</capabilities>

View File

@@ -0,0 +1,40 @@
<versions>
<version displayName="JSF 1.1.02 - Reference Implementation">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.1" />
</version>
<version displayName="JSF 1.2" servlet-version="2.5">
<lib type="core" location="../lib/jsf-1.2"/>
<lib type="common" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.2" />
</version>
<version displayName="JSF 1.2 with Facelets" servlet-version="2.5">
<lib type="core" location="../lib/jsf-1.2" />
<lib type="common" location="../lib/facelets" />
<lib type="common" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.2-facelets" />
</version>
<version displayName="JSF 2.0" servlet-version="3.0" min-servlet-version="2.5">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.0" />
</version>
<version displayName="JSF 2.1" servlet-version="3.0" min-servlet-version="2.5">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.1" />
</version>
<version displayName="JSF 2.2" servlet-version="3.0" min-servlet-version="2.5">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.2" />
</version>
<version displayName="JSF 2.3" servlet-version="4.0" min-servlet-version="2.5">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.3" />
</version>
</versions>

View File

@@ -0,0 +1,2 @@
ant/build.xml
WebContent/WEB-INF/web.xml

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
</faces-config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,87 @@
<project name="$name" basedir="../" default="deploy">
<!-- Project settings -->
<property name="project.distname" value="$name"/>
<!-- Local system paths -->
<property file="${basedir}/ant/build.properties"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>
<!-- classpath for JSF 1.1.01 -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${webinf.dir}/lib/jstl.jar"/>
<pathelement path ="${webinf.dir}/lib/standard.jar"/>
<pathelement path ="${webinf.dir}/classes"/>
<pathelement path ="${classpath.external}"/>
<pathelement path ="${classpath}"/>
</path>
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp/>
</target>
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</patternset>
</fileset>
</copy>
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
</target>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<war
basedir="${webroot.dir}"
warfile="${build.dir}/${project.distname}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
</war>
</target>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,2 @@
ant/build.xml
WebContent/WEB-INF/web.xml

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,3 @@
header=Hello Demo Application
prompt_message=Name:
hello_message=Hello

View File

@@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package demo;
/**
* Created by JBoss Developer Studio
*/
public class User {
private String name;
/**
* @return User Name
*/
public String getName() {
return name;
}
/**
* @param User Name
*/
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
<description>User Name Bean</description>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>demo.User</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/inputUserName.jsp</from-view-id>
<navigation-case>
<from-outcome>hello</from-outcome>
<to-view-id>/pages/hello.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,7 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body>
<jsp:forward page="/pages/inputUserName.jsf" />
</body>
</html>

View File

@@ -0,0 +1,20 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:loadBundle var="Message" basename="demo.Messages" />
<html>
<head>
<title>Hello!</title>
</head>
<body>
<f:view>
<h3>
<h:outputText value="#{Message.hello_message}" />,
<h:outputText value="#{user.name}" />!
</h3>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:loadBundle var="Message" basename="demo.Messages"/>
<html>
<head>
<title>Input User Name Page</title>
</head>
<body>
<f:view>
<h1><h:outputText value="#{Message.header}"/></h1>
<h:messages style="color: red"/>
<h:form id="greetingForm">
<h:outputText value="#{Message.prompt_message}"/>
<h:inputText value="#{user.name}" required="true">
<f:validateLength maximum="30" minimum="3"/>
</h:inputText>
<h:commandButton action="hello" value="Say Hello!" />
</h:form>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<project name="KickStart" default="deploy" basedir="../">
<!-- Project settings -->
<property file="${basedir}/ant/build.properties" />
<property name="project.name" value="KickStart" />
<property name="web.content.dir" value="${basedir}/WebContent" />
<property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
<property name="build.dir" value="build" />
<property name="war.name" value="${build.dir}/${project.name}.war" />
<!-- Define a folder for deployment -->
<property name="deploy.dir" value="deploy" />
<!-- Compile classpath -->
<path id="compile.classpath">
<fileset dir="${webinf.dir}/lib">
<include name="**/*.jar" />
</fileset>
<pathelement path="${classpath}" />
<pathelement path="${classpath.external}" />
<pathelement path="${webinf.dir}/classes" />
</path>
<!-- Copy any resource or configuration files -->
<target name="copyResources">
<copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.*" />
<exclude name="**/*.java" />
</patternset>
</fileset>
</copy>
</target>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp />
</target>
<!-- Remove classes directory for clean build -->
<target name="clean" description="Prepare for clean build">
<delete dir="${web-inf.dir}/classes" failonerror="false"/>
<mkdir dir="${web-inf.dir}/classes" />
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare, copyResources">
<javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
<classpath refid="compile.classpath" />
</javac>
</target>
<!-- Build Project -->
<target name="build" depends="prepare, compile" />
<!-- Rebuild Project -->
<target name="rebuild" depends="clean, prepare, compile" />
<!-- Build WAR -->
<target name="war" depends="build">
<mkdir dir="${build.dir}" />
<war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
<exclude name="WEB-INF/web.xml" />
</war>
</target>
<target name="deploy" depends="war">
<delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
<copy file="${war.name}" todir="${deploy.dir}" />
</target>
</project>

View File

@@ -0,0 +1,2 @@
ant/build.xml
WebContent/WEB-INF/web.xml

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,3 @@
header=Hello Demo Application
prompt_message=Name:
hello_message=Hello

View File

@@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package demo;
/**
* Created by JBoss Developer Studio
*/
public class User {
private String name;
/**
* @return User Name
*/
public String getName() {
return name;
}
/**
* @param User Name
*/
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
<description>User Name Bean</description>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>demo.User</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/inputUserName.jsp</from-view-id>
<navigation-case>
<from-outcome>hello</from-outcome>
<to-view-id>/pages/hello.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,7 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body>
<jsp:forward page="/pages/inputUserName.jsf" />
</body>
</html>

View File

@@ -0,0 +1,20 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:loadBundle var="Message" basename="demo.Messages" />
<html>
<head>
<title>Hello!</title>
</head>
<body>
<f:view>
<h3>
<h:outputText value="#{Message.hello_message}" />,
<h:outputText value="#{user.name}" />!
</h3>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:loadBundle var="Message" basename="demo.Messages"/>
<html>
<head>
<title>Input User Name Page</title>
</head>
<body>
<f:view>
<h1><h:outputText value="#{Message.header}"/></h1>
<h:messages style="color: red"/>
<h:form id="greetingForm">
<h:outputText value="#{Message.prompt_message}"/>
<h:inputText value="#{user.name}" required="true">
<f:validateLength maximum="30" minimum="3"/>
</h:inputText>
<h:commandButton action="hello" value="Say Hello!" />
</h:form>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<project name="KickStart" default="deploy" basedir="../">
<!-- Project settings -->
<property file="${basedir}/ant/build.properties" />
<property name="project.name" value="KickStart" />
<property name="web.content.dir" value="${basedir}/WebContent" />
<property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
<property name="build.dir" value="build" />
<property name="war.name" value="${build.dir}/${project.name}.war" />
<!-- Define a folder for deployment -->
<property name="deploy.dir" value="deploy" />
<!-- Compile classpath -->
<path id="compile.classpath">
<fileset dir="${webinf.dir}/lib">
<include name="**/*.jar" />
</fileset>
<pathelement path="${classpath}" />
<pathelement path="${classpath.external}" />
<pathelement path="${webinf.dir}/classes" />
</path>
<!-- Copy any resource or configuration files -->
<target name="copyResources">
<copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.*" />
<exclude name="**/*.java" />
</patternset>
</fileset>
</copy>
</target>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp />
</target>
<!-- Remove classes directory for clean build -->
<target name="clean" description="Prepare for clean build">
<delete dir="${web-inf.dir}/classes" failonerror="false"/>
<mkdir dir="${web-inf.dir}/classes" />
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare, copyResources">
<javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
<classpath refid="compile.classpath" />
</javac>
</target>
<!-- Build Project -->
<target name="build" depends="prepare, compile" />
<!-- Rebuild Project -->
<target name="rebuild" depends="clean, prepare, compile" />
<!-- Build WAR -->
<target name="war" depends="build">
<mkdir dir="${build.dir}" />
<war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
<exclude name="WEB-INF/web.xml" />
</war>
</target>
<target name="deploy" depends="war">
<delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
<copy file="${war.name}" todir="${deploy.dir}" />
</target>
</project>

View File

@@ -0,0 +1,2 @@
WebContent/WEB-INF/web.xml
ant/build.xml

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="BnankwithFacelets" model-entity="FileSystems"
VERSION="7.0.4" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder" location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-beanutils.jar" NAME="lib-commons-beanutils.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-collections.jar" NAME="lib-commons-collections.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-digester.jar" NAME="lib-commons-digester.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-logging.jar" NAME="lib-commons-logging.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-api.jar" NAME="lib-jsf-api.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-impl.jar" NAME="lib-jsf-impl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jstl.jar" NAME="lib-jstl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/standard.jar" NAME="lib-standard.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/jsf-facelets.jar" NAME="lib-jsf-facelets.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-api.jar" NAME="lib-el-api.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-ri.jar" NAME="lib-el-ri.jar"/>
<file-system model-entity="FileSystemFolder"
location="%eclipse.project%" NAME="flet001"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config/>
</application>
<factory/>
<lifecycle/>
</faces-config>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
#if ($servlet_version == "2.4" || $servlet_version == "2.5")
<description>Facelets StarterKit</description>
<display-name>Facelets</display-name>
#else
<display-name>Facelets</display-name>
<description>Facelets StarterKit</description>
#end
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,87 @@
<project name="FaceletsKickStart" basedir="../" default="deploy">
<!-- Project settings -->
<property name="project.distname" value="FaceletsKickStart"/>
<!-- Local system paths -->
<property file="${basedir}/ant/build.properties"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>
<!-- classpath for JSF 1.0 -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${webinf.dir}/lib/jstl.jar"/>
<pathelement path ="${webinf.dir}/lib/standard.jar"/>
<pathelement path ="${webinf.dir}/classes"/>
<pathelement path ="${classpath.external}"/>
<pathelement path ="${classpath}"/>
</path>
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp/>
</target>
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</patternset>
</fileset>
</copy>
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
</target>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<war
basedir="${webroot.dir}"
warfile="${build.dir}/${project.distname}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
</war>
</target>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="Facelets KickStart" model-entity="FileSystems"
VERSION="7.0.3" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder" location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-beanutils.jar" NAME="lib-commons-beanutils.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-collections.jar" NAME="lib-commons-collections.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-digester.jar" NAME="lib-commons-digester.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-logging.jar" NAME="lib-commons-logging.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-api.jar" NAME="lib-jsf-api.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-impl.jar" NAME="lib-jsf-impl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jstl.jar" NAME="lib-jstl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/standard.jar" NAME="lib-standard.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/jsf-facelets.jar" NAME="lib-jsf-facelets.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-api.jar" NAME="lib-el-api.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-ri.jar" NAME="lib-el-ri.jar"/>
<file-system model-entity="FileSystemFolder"
location="%eclipse.project%" NAME="flet001"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package demo;
/**
* Created by JBoss Tools
*/
public class Person {
private String name;
public Person() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>person</managed-bean-name>
<managed-bean-class>demo.Person</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>name</property-name>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/inputname.xhtml</from-view-id>
<navigation-case>
<from-outcome>greeting</from-outcome>
<to-view-id>/pages/greeting.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config/>
</application>
<factory/>
<lifecycle/>
</faces-config>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
#if ($servlet_version == "2.4" || $servlet_version == "2.5")
<description>Facelets StarterKit</description>
<display-name>Facelets</display-name>
#else
<display-name>Facelets</display-name>
<description>Facelets StarterKit</description>
#end
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,7 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head></head>
<body>
<jsp:forward page="pages/inputname.jsf" />
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:loadBundle basename="resources" var="msg" />
<ui:composition template="/templates/common.xhtml">
<ui:define name="pageTitle">Greeting to User</ui:define>
<ui:define name="pageHeader">Greeting Page</ui:define>
<ui:define name="body">
#{msg.greeting} #{person.name}!
</ui:define>
</ui:composition>
</html>

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
<f:loadBundle basename="resources" var="msg" />
<ui:composition template="/templates/common.xhtml">
<ui:define name="pageTitle">Input User Name</ui:define>
<ui:define name="pageHeader">Facelets Hello Application</ui:define>
<ui:define name="body">
<h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="name" />
<form jsfc="h:form" id="helloForm">
${msg.prompt}
<input label="Name" jsfc="h:inputText" required="true" id="name" value="#{person.name}" />
<input type="submit" jsfc="h:commandButton" id="submit"
action="greeting" value="Say Hello" />
</form>
</ui:define>
</ui:composition>
</html>

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:loadBundle basename="resources" var="msg" />
<head>
<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
}
.bottom {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
text-align: center;
vertical-align: middle;
color: #8E969D;
}
</style>
</head>
<body bgcolor="#ffffff">
<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
<tbody>
<tr>
<td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
<ui:insert name="pageHeader">Page Header</ui:insert>
</td>
</tr>
<tr>
<td height="1" width="100%" bgcolor="#CAD6E0"></td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td align="center" width="100%" valign="middle">
<ui:insert name="body">Page Body</ui:insert>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<project name="jsf12KickStart" basedir="../" default="deploy">
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>
<!-- Project settings -->
<property name="project.distname" value="jsf12KickStart"/>
<!-- Local system paths -->
<property file="${basedir}/ant/build.properties"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>
<!-- classpath for JSF 1.0 -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${webinf.dir}/lib/jstl.jar"/>
<pathelement path ="${webinf.dir}/lib/standard.jar"/>
<pathelement path ="${webinf.dir}/classes"/>
<pathelement path ="${classpath}"/>
</path>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp/>
</target>
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</patternset>
</fileset>
</copy>
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
</target>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<war
basedir="${webroot.dir}"
warfile="${build.dir}/${project.distname}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
</war>
</target>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="Facelets KickStart" model-entity="FileSystems"
VERSION="7.0.3" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder" location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-beanutils.jar" NAME="lib-commons-beanutils.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-collections.jar" NAME="lib-commons-collections.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-digester.jar" NAME="lib-commons-digester.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/commons-logging.jar" NAME="lib-commons-logging.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-api.jar" NAME="lib-jsf-api.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jsf-impl.jar" NAME="lib-jsf-impl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/jstl.jar" NAME="lib-jstl.jar"/>
<file-system model-entity="FileSystemJar" INFO="hidden=yes"
location="%workspace.home%/lib/standard.jar" NAME="lib-standard.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/jsf-facelets.jar" NAME="lib-jsf-facelets.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-api.jar" NAME="lib-el-api.jar"/>
<file-system model-entity="FileSystemJar"
location="%workspace.home%/lib/el-ri.jar" NAME="lib-el-ri.jar"/>
<file-system model-entity="FileSystemFolder"
location="%eclipse.project%" NAME="flet001"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package demo;
/**
* Created by JBoss Tools
*/
public class Person {
private String name;
public Person() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>person</managed-bean-name>
<managed-bean-class>demo.Person</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>name</property-name>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/inputname.xhtml</from-view-id>
<navigation-case>
<from-outcome>greeting</from-outcome>
<to-view-id>/pages/greeting.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config/>
</application>
<factory/>
<lifecycle/>
</faces-config>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
#if ($servlet_version == "2.4" || $servlet_version == "2.5")
<description>Facelets StarterKit</description>
<display-name>Facelets</display-name>
#else
<display-name>Facelets</display-name>
<description>Facelets StarterKit</description>
#end
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,7 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head></head>
<body>
<jsp:forward page="pages/inputname.jsf" />
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:loadBundle basename="resources" var="msg" />
<ui:composition template="/templates/common.xhtml">
<ui:define name="pageTitle">Greeting to User</ui:define>
<ui:define name="pageHeader">Greeting Page</ui:define>
<ui:define name="body">
#{msg.greeting} #{person.name}!
</ui:define>
</ui:composition>
</html>

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
<f:loadBundle basename="resources" var="msg" />
<ui:composition template="/templates/common.xhtml">
<ui:define name="pageTitle">Input User Name</ui:define>
<ui:define name="pageHeader">Facelets Hello Application</ui:define>
<ui:define name="body">
<h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="name" />
<form jsfc="h:form" id="helloForm">
${msg.prompt}
<input label="Name" jsfc="h:inputText" required="true" id="name" value="#{person.name}" />
<input type="submit" jsfc="h:commandButton" id="submit"
action="greeting" value="Say Hello" />
</form>
</ui:define>
</ui:composition>
</html>

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:loadBundle basename="resources" var="msg" />
<head>
<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
}
.bottom {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
text-align: center;
vertical-align: middle;
color: #8E969D;
}
</style>
</head>
<body bgcolor="#ffffff">
<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
<tbody>
<tr>
<td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
<ui:insert name="pageHeader">Page Header</ui:insert>
</td>
</tr>
<tr>
<td height="1" width="100%" bgcolor="#CAD6E0"></td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td align="center" width="100%" valign="middle">
<ui:insert name="body">Page Body</ui:insert>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,87 @@
<project name="$name" basedir="../" default="deploy">
<!-- Project settings -->
<property name="project.distname" value="$name"/>
<!-- Local system paths -->
<property file="${basedir}/ant/build.properties"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>
<!-- classpath for JSF 1.0 -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${webinf.dir}/lib/jstl.jar"/>
<pathelement path ="${webinf.dir}/lib/standard.jar"/>
<pathelement path ="${webinf.dir}/classes"/>
<pathelement path ="${classpath.external}"/>
<pathelement path ="${classpath}"/>
</path>
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp/>
</target>
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</patternset>
</fileset>
</copy>
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
</target>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<war
basedir="${webroot.dir}"
warfile="${build.dir}/${project.distname}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
</war>
</target>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,2 @@
ant/build.xml
WebContent/WEB-INF/web.xml

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd">
<application>
<locale-config/>
</application>
<factory/>
<lifecycle/>
</faces-config>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,87 @@
<project name="$name" basedir="../" default="deploy">
<!-- Project settings -->
<property name="project.distname" value="$name"/>
<!-- Local system paths -->
<property file="${basedir}/ant/build.properties"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>
<!-- classpath for JSF 1.1.01 -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
<pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${webinf.dir}/lib/jstl.jar"/>
<pathelement path ="${webinf.dir}/lib/standard.jar"/>
<pathelement path ="${webinf.dir}/classes"/>
<pathelement path ="${classpath.external}"/>
<pathelement path ="${classpath}"/>
</path>
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp/>
</target>
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</patternset>
</fileset>
</copy>
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
</target>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<war
basedir="${webroot.dir}"
warfile="${build.dir}/${project.distname}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
</war>
</target>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,2 @@
ant/build.xml
WebContent/WEB-INF/web.xml

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,3 @@
header=Hello Demo Application
prompt_message=Name:
hello_message=Hello

View File

@@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
package demo;
/**
* Created by JBoss Developer Studio
*/
public class User {
private String name;
/**
* @return User Name
*/
public String getName() {
return name;
}
/**
* @param User Name
*/
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd">
<managed-bean>
<description>User Name Bean</description>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>demo.User</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/inputUserName.jsp</from-view-id>
<navigation-case>
<from-outcome>hello</from-outcome>
<to-view-id>/pages/hello.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<locale-config/>
</application>
<factory/>
<lifecycle/>
</faces-config>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,7 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body>
<jsp:forward page="/pages/inputUserName.jsf" />
</body>
</html>

View File

@@ -0,0 +1,20 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:loadBundle var="Message" basename="demo.Messages" />
<html>
<head>
<title>Hello!</title>
</head>
<body>
<f:view>
<h3>
<h:outputText value="#{Message.hello_message}" />,
<h:outputText value="#{user.name}" />!
</h3>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:loadBundle var="Message" basename="demo.Messages"/>
<html>
<head>
<title>Input User Name Page</title>
</head>
<body>
<f:view>
<h1><h:outputText value="#{Message.header}"/></h1>
<h:messages style="color: red"/>
<h:form id="greetingForm">
<h:outputText value="#{Message.prompt_message}"/>
<h:inputText value="#{user.name}" required="true">
<f:validateLength maximum="30" minimum="3"/>
</h:inputText>
<h:commandButton action="hello" value="Say Hello!" />
</h:form>
</f:view>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<project name="KickStart" default="deploy" basedir="../">
<!-- Project settings -->
<property file="${basedir}/ant/build.properties" />
<property name="project.name" value="KickStart" />
<property name="web.content.dir" value="${basedir}/WebContent" />
<property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
<property name="build.dir" value="build" />
<property name="war.name" value="${build.dir}/${project.name}.war" />
<!-- Define a folder for deployment -->
<property name="deploy.dir" value="deploy" />
<!-- Compile classpath -->
<path id="compile.classpath">
<fileset dir="${webinf.dir}/lib">
<include name="**/*.jar" />
</fileset>
<pathelement path="${classpath}" />
<pathelement path="${classpath.external}" />
<pathelement path="${webinf.dir}/classes" />
</path>
<!-- Copy any resource or configuration files -->
<target name="copyResources">
<copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<patternset>
<include name="**/*.*" />
<exclude name="**/*.java" />
</patternset>
</fileset>
</copy>
</target>
<!-- Check timestamp on files -->
<target name="prepare">
<tstamp />
</target>
<!-- Remove classes directory for clean build -->
<target name="clean" description="Prepare for clean build">
<delete dir="${web-inf.dir}/classes" failonerror="false"/>
<mkdir dir="${web-inf.dir}/classes" />
</target>
<!-- Normal build of application -->
<target name="compile" depends="prepare, copyResources">
<javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
<classpath refid="compile.classpath" />
</javac>
</target>
<!-- Build Project -->
<target name="build" depends="prepare, compile" />
<!-- Rebuild Project -->
<target name="rebuild" depends="clean, prepare, compile" />
<!-- Build WAR -->
<target name="war" depends="build">
<mkdir dir="${build.dir}" />
<war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
<exclude name="WEB-INF/web.xml" />
</war>
</target>
<target name="deploy" depends="war">
<delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
<copy file="${war.name}" todir="${deploy.dir}" />
</target>
</project>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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-facesconfig_2_0.xsd"
version="2.0">
</faces-config>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
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/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
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_2_5.xsd">
#elseif ($servlet_version == "3.0")
<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">
#elseif ($servlet_version == "3.1")
<web-app version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
#else
<!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>
#end
<display-name>${project.name}</display-name>
<!--
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
-->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
location="%workspace.home%/.." NAME="WEB-ROOT"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../JavaSource" NAME="src"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/lib" NAME="lib"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/classes" NAME="classes"/>
<file-system model-entity="FileSystemFolder"
location="%workspace.home%/../../ant" NAME="build"/>
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
</WEB>
</file-systems>

Some files were not shown because too many files have changed in this diff Show More