Initialer Commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
WebContent/WEB-INF/web.xml
|
||||
ant/build.xml
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,2 @@
|
||||
ant/build.xml
|
||||
WebContent/WEB-INF/web.xml
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
prompt=Your Name\:
|
||||
greeting=Hello
|
||||
@@ -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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,2 @@
|
||||
ant/build.xml
|
||||
WebContent/WEB-INF/web.xml
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
prompt=Your Name\:
|
||||
greeting=Hello
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user