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,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>