Skip to content

Commit

Permalink
jsf1.2 profile for jsf/numberguess example
Browse files Browse the repository at this point in the history
  • Loading branch information
mgencur authored and pmuir committed Oct 11, 2010
1 parent c38541b commit ce6f086
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/jsf/numberguess/README.md
Expand Up @@ -28,6 +28,10 @@ using this command:
ant restart

Now you can view the application at <http://localhost:8080/weld-numberguess>.

Alternatively, you can deploy the application using JavaServer Faces 1.2 implementation:

ant restart -Dprofile=jboss6-jsf12


Deploying to standalone Tomcat
Expand Down
3 changes: 2 additions & 1 deletion examples/jsf/numberguess/build.xml
@@ -1,12 +1,13 @@
<project basedir="." name="Numberguess Example Build" default="restart">

<property name="example.name" value="weld-numberguess" />
<property name="profile" value="jboss6" />

<import file="../../build.xml" />

<target name="package">
<maven target="install" basedir="${basedir}">
<arg line="-Pjboss6" />
<arg line="-P${profile}" />
</maven>
</target>

Expand Down
47 changes: 47 additions & 0 deletions examples/jsf/numberguess/pom.xml
Expand Up @@ -103,6 +103,53 @@
</plugins>
</build>
</profile>
<profile>
<id>jboss6-jsf12</id>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>${facelets.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp-jboss5-jsf12</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jboss5-servlet</id>

Expand Down
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2"
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_1_2.xsd">

<name>numberguess</name>

<faces-config>
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
</faces-config>

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

<display-name>Web Beans Numberguess example</display-name>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</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>

<session-config>
<session-timeout>10</session-timeout>
</session-config>

<context-param>
<param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
<param-value>Mojarra-1.2</param-value>
</context-param>

</web-app>
1 change: 1 addition & 0 deletions examples/pom.xml
Expand Up @@ -88,6 +88,7 @@
<properties>
<!-- Override JSF version to 2.0 -->
<jsf.version>2.0.2-FCS</jsf.version>
<facelets.version>1.1.15</facelets.version>
<jetty.version>6.1.21</jetty.version>
<!-- UEL Impl -->
<uel.version>2.2</uel.version>
Expand Down

0 comments on commit ce6f086

Please sign in to comment.