SlideShare a Scribd company logo
1 of 25
1



 The author has made every effort in the preparation of this book to ensure the accuracy of the information.
However, information in this book is sold without warranty either expressed or implied. The author will not be
    held liable for any damages caused or alleged to be caused either directly or indirectly by this book.




         JSF, Facelets, Spring-JSF & Maven
 Facelets is a powerful templating language built from ground up for JSF.
 Facelets allow for greater code reuse than JSPs. This tutorial provides an
  example of how to work with JSF, Facelets and Spring-JSF along with
                            Maven-2 in Eclipse.




                                                    by




                                        K. Arulkumaran


                                           & A. Sivayini




               Website: http://www.lulu.com/java-success


             Feedback email: java-interview@hotmail.com
2

                                                 Table Of Contents


Notations ..................................................................................................................... 3
Tutorial 7 – JSF, Facelets, Maven & Eclipse...................................................... 4
Tutorial 8 – JSF, Facelets, Spring, Maven & Eclipse..................................... 19
3
                                     Notations

Command prompt:




Eclipse:




File Explorer or Windows Explorer:




Internet Explorer:
4
Tutorial 7 – JSF, Facelets, Maven & Eclipse


This tutorial will guide you through re-building tutorial-3 for simpleWeb with
facelets. It assumes that you have read tutorials 1-3.

The 3rd party library jar files required are:

                  <!-- JSF/JSTL/Facelets -->
                  <dependency>
                        <groupId>javax.faces</groupId>
                        <artifactId>jsf-api</artifactId>
                        <version>1.2</version>
                  </dependency>
                  <dependency>
                        <groupId>javax.faces</groupId>
                        <artifactId>jsf-impl</artifactId>
                        <version>1.2_04</version>
                  </dependency>
                  <dependency>
                        <groupId>com.sun.facelets</groupId>
                        <artifactId>jsf-facelets</artifactId>
                        <version>1.1.11</version>
                  </dependency>
                  <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>jstl</artifactId>
                        <version>1.1.2</version>
                  </dependency>
                  <dependency>
                        <groupId>javax.el</groupId>         Provided means used for
                        <artifactId>el-api</artifactId>     compiling but no need to
                        <version>1.0</version>              package it. This is because
                        <scope>provided</scope>             the Tomcat server has this
                  </dependency>                             package under its lib folder
                  <dependency>
                        <groupId>com.sun.el</groupId>
                        <artifactId>el-ri</artifactId>
                        <version>1.0</version>
                  </dependency>


Artifact el-ri (Expression Language – reference implementation) can be downloaded from the
following repository and all the other jars except jsf-impl (Sun JSF RI ) should be available from the
maven-2 default repository http://repo1.maven.org/maven2/.

         <repositories>
               <repository>
                     <id>maven-repository.dev.java.net</id>
                     <name>Java Dev Net Repository</name>
                     <url>http://download.java.net/maven/2/</url>
                     <releases>
                           <enabled>true</enabled>
                           <updatePolicy>never</updatePolicy>
                     </releases>
                     <snapshots>
                           <enabled>false</enabled>
                     </snapshots>
               </repository>
         </repositories>
5
Step1: Download JSF 1.2_04 P02 from the site https://javaserverfaces.dev.java.net/download.html
into say your download directory. Create a new folder maven_lib under your c:java folder for the
special library files which you can’t download from any maven repositories. Copy the jsf-impl.jar to
your “c:javamaven_lib” folder and rename it to “jsf-impl-1.2_04.jar”.




Now you need to install this JSF implementation jar into your local maven repository in
c:java.m2repository. To do this run the following command in a command prompt:

mvn install:install-file -Dfile=jsf-impl-1.2_04.jar -DgroupId=javax.faces -DartifactId=jsf-impl -
Dversion=1.2_04 -Dpackaging=jar -DgeneratePom=true




After running the above command, you can check for the presence of the jsf-impl-1.2_04.jar file in
your local maven 2 repository “c:java.m2repositoryjavax”.
6




Now the revised pom.xml file under c:tutorialssimpleWeb should look like:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-
         v4_0_0.xsd">

        <modelVersion>4.0.0</modelVersion>
        <groupId>com.mytutorial</groupId>
        <artifactId>simpleWeb</artifactId>
        <packaging>war</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>simpleWeb Maven Webapp</name>
        <url>http://maven.apache.org</url>
        <dependencies>
                  <dependency>
                          <groupId>junit</groupId>
                          <artifactId>junit</artifactId>
                          <version>3.8.1</version>
                          <scope>test</scope>
                  </dependency>

                 <dependency>
                         <groupId>commons-digester</groupId>
                         <artifactId>commons-digester</artifactId>
                         <version>1.8</version>
                 </dependency>

                 <dependency>
                         <groupId>commons-collections</groupId>
                         <artifactId>commons-collections</artifactId>
                         <version>3.2</version>
                 </dependency>
7
        <!-- JSF/JSTL/Facelets -->
        <dependency>
                <groupId>javax.faces</groupId>
                <artifactId>jsf-api</artifactId>
                <version>1.2</version>
        </dependency>
        <dependency>
                <groupId>javax.faces</groupId>
                <artifactId>jsf-impl</artifactId>
                <version>1.2_04</version>
        </dependency>
        <dependency>
                <groupId>com.sun.facelets</groupId>
                <artifactId>jsf-facelets</artifactId>
                <version>1.1.11</version>
        </dependency>
        <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>1.1.2</version>
        </dependency>
        <dependency>
                <groupId>javax.el</groupId>
                <artifactId>el-api</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
        </dependency>
        <dependency>
                <groupId>com.sun.el</groupId>
                <artifactId>el-ri</artifactId>
                <version>1.0</version>
        </dependency>

</dependencies>

<build>
  <finalName>simpleWeb</finalName>
  <pluginManagement>
     <plugins>
         <plugin>                                               Java compiler
             <groupId>org.apache.maven.plugins</groupId>        JDK 1.5
             <artifactId>maven-compiler-plugin</artifactId>
             <version>2.0.2</version>
                   <configuration>
                      <source>1.5</source>
                     <target>1.5</target>
                   </configuration>
           </plugin>
           <plugin>                                           Using WTP 2.4 but
             <groupId>org.apache.maven.plugins</groupId>      JSF 1.2 requires 2.5,
             <artifactId>maven-eclipse-plugin</artifactId>    which is not yet
             <version>2.4</version>                           available. So refer
             <configuration>                                  Step: WorkAround
                   <downloadSources>false</downloadSources>   to manually change
                   <wtpversion>1.5</wtpversion>               this value.
               </configuration>
           </plugin>
          </plugins>
         </pluginManagement>
</build>

<repositories>
         <repository>
8
                           <id>maven-repository.dev.java.net</id>
                           <name>Java Dev Net Repository</name>
                           <url>http://download.java.net/maven/2/</url>
                           <releases>
                                    <enabled>true</enabled>
                                    <updatePolicy>never</updatePolicy>
                           </releases>
                           <snapshots>                           By default maven uses
                                    <enabled>false</enabled>     http://repo1.maven.org/maven2/
                           </snapshots>                          and your local repository in
                  </repository>                                  c:java.m2repository. Any other
         </repositories>                                         repositories need to be defined in
                                                                 the pom.xml file. el-i-1.0.jar can
</project>                                                       be found at this repository.

Note: if a particular jar file is not available in any repositories,
it can be downloaded separately and installed in to your local
repository c:java.m2repository using “mvn install:install-file …” as shown above.

Step-2: If you are already inside eclipse, exit out of it and run the following maven command from
c:tutorialssimpleWeb to generate eclipse build path (i.e. classpath).




STEP: WorkAround

The JSF 1.2 requires eclipse web facet 2.5. You need to open the file
“org.eclipse.wst.common.project.facet.core.xml” under C:tutorialssimpleWeb.settings as shown
below from version=2.4 to version=2.5. Every time you use the eclipse:clean command, you will have
to manually fix this up as shown below.




Step-3: Now get back into eclipse and click “F5” for refresh on the “simpleWeb” project. The
required files need to be completed as shown below:
9




PersonBean.java (Model)

package com.mytutorial;

public class PersonBean {
      String personName;

       public String getPersonName() {
             return personName;
       }

       public void setPersonName(String personName) {
             this.personName = personName;
       }
}


PersonBeanController.java (Controller)


package com.mytutorial;

public class PersonControllerBean {

       PersonBean person = new PersonBean(); //later on we will inject
                                             //this using spring

       public String getPersonName() {
             return person.getPersonName();
       }

       public void setPersonName(String personName) {
             person.setPersonName(personName);
       }

       public PersonBean getPerson() {
             return person;
       }
10

        public void setPerson(PersonBean person) {
              this.person = person;
        }

}


messages.properties (same as before in tutorial-3)

inputname_header=JSF Tutorial
prompt=Tell me your name:
greeting_text=Welcome to JSF
button_text=Hello
sign=!


greeting.jspx (page)

Note: The recommended extension for pages by facelets is the “.xhtml”. Since eclipse does not
recognize this and would not provide you code assist when you press ctrl-Space. So the work around is
to use the extension .jspx to solve this problem. These .jspx files can be opened using the webpage
editor provided by eclipse 3.3 WTP. To open the greeting.jspx in a webpage editor right click on it and
select “other” and then “WebPage Editor”
11




The completed “greeting.jspx” should look like:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" version="2.0">

         <ui:composition>
           <html>
               <head>
                  <title>greeting page</title>
               </head>
               <body>
                   <f:loadBundle basename="com.mytutorial.messages" var="msg" />
                     <h3
                         <h:outputText value="#{msg.greeting_text}" />, <h:outputText
                                    value="#{personBean.personName}" />
                         <h:outputText value="#{msg.sign}" />
                     </h3>                                                   Defined in faces-
                                                                             config.xml
                </body>
             </html>
           </ui:composition>
</jsp:root>
12




inputname.jspx

<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets" version="2.0">

        <ui:composition>
          <html>
              <head>
                <meta http-equiv="Content-Type"
                         content="text/html; charset=ISO-8859-1" />
                 <title>Insert title here</title>
               </head>
               <body>
                <f:view>
                    <f:loadBundle basename="com.mytutorial.messages" var="msg" />
                        <h3>
                          <h:form id="helloForm">
                             <h:outputText value="#{msg.prompt}" />
                             <h:inputText value="#{personBean.personName}" />

                                <h:commandButton action="greeting" value="#{msg.button_text}" />
                                <h:outputText></h:outputText>
                              </h:form>
                             </h3>
                      </f:view>
                     </body>
                   </html>
              </ui:composition>
</jsp:root>
13




faces-config.xml

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

        <navigation-rule>
                <from-view-id>/pages/inputname.jspx</from-view-id>
                <navigation-case>
                         <from-outcome>greeting</from-outcome>
                         <to-view-id>/pages/greeting.jspx</to-view-id>
                </navigation-case>
        </navigation-rule>
                                                         Used in JSF pages

        <managed-bean>
               <managed-bean-name>personBean</managed-bean-name>
               <managed-bean-class>
                       com.mytutorial.PersonControllerBean
               </managed-bean-class>
               <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>


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

</faces-config>
14




web.xml

<!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>
       <context-param>
               <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
               <param-value>server</param-value>
       </context-param>

          <context-param>
                  <param-name>javax.faces.CONFIG_FILES</param-name>
                  <param-value>/WEB-INF/faces-config.xml</param-value>
          </context-param>

          <context-param>
                  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                  <param-value>.jspx</param-value>
          </context-param>

          <!-- Special Debug Output for Development -->
          <context-param>
                   <param-name>facelets.DEVELOPMENT</param-name>
                   <param-value>true</param-value>
          </context-param>

          <!-- Optional JSF-RI Parameters to Help Debug -->
          <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>
15
        </context-param>

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




Finally the “index.jspx”

<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" version="2.0">

        <ui:composition>
              <html>
              <body>

                 <f:view>
                       <a href="pages/inputname.jsf">Click Me</a>
                       <br />
                 </f:view>
                 </body>
16
            </html>
      </ui:composition>
</jsp:root>




You can now try to build it and deploy it to tomcat as discussed in tutorial-3. Try deploying it from
both inside eclipse & outside. You can check your deployed war file from inside eclipse under
following folder (check if it is properly packaged):




Important!!
17
It is important to note that, if you are deploying to Tomcat inside eclipse, remember to exclude the jar
files which are already available under Tomcat’s lib directory. So you need to remove the el-api-
1.0.jar file from getting packaged. You could do this inside eclipse by right clicking on simpleWeb
and then selecting “properties”. Under J2EE module dependencies make sure that el-api-1.0.jar is
unticked. Only the ticked files make it to the WEB-INlib folder. If you build the war file outside
eclipse then maven pom.xml file will take care of this, since its scope is declared as “provided”.




The URL to use after you deploy/publish and start the Tomcat server:

http://localhost:8080/simpleWeb/index.jsf
18




Please feel free to email any errors to java-interview@hotmail.com. Also stay tuned at
    http://www.lulu.com/java-success for more tutorials and Java/J2EE interview
                                        resources.
19
Tutorial 8 – JSF, Facelets, Spring, Maven & Eclipse


This is the continuation of tutorial-7 for simpleWeb with Spring. It assumes
that you have read tutorials 1-3 and tutorial 7. You need to make use of
Spring with JSF:


Add spring.jar to the pom.xml file under c:tutorialssimpleWeb

<dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
       <version>2.0.6</version>
</dependency>




After adding, save it and exit out of eclipse and run the following mvn (Maven) command
from the command line.


mvn eclipse:eclipse
20




STEP: WorkAround

The JSF 1.2 requires eclipse web facet 2.5. You need to open the file
“org.eclipse.wst.common.project.facet.core.xml” under C:tutorialssimpleWeb.settings as show
below from version=2.4 to version=2.5. Every time you use the eclipse:clean command, you will have
to manually fix this up as shown below.




You can now open eclipse and refresh (i.e. F5) simpleWeb project. After this if you check
your eclipse build path, it should look like below with spring-2.0.6.jar.
21




Also check your project facet to make sure that dynamic web module is 2.5. If not repeat step marked
“Work Around” above after exiting eclipse.



To use Spring make the following changes to the existing artifacts and also add the
“applicationContext.xml” file under WEB-INF.



PersonControllerBean.java

Note the comments in bold. Spring will inject this.

package com.mytutorial;

public class PersonControllerBean {

         PersonBean person; //removed instantiation.
                            //Spring will inject this using the setter.

         public String getPersonName() {
               return person.getPersonName();
         }

         public void setPersonName(String personName) {
               person.setPersonName(personName);
         }

         public PersonBean getPerson() {
               return person;
         }

         public void setPerson(PersonBean person) {
               this.person = person;
         }

}


Let’s add the applicationContext.xml file
22
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

        <bean id="person" class="com.mytutorial.PersonBean" />

        <bean id="personBean" class="com.mytutorial.PersonControllerBean" scope="session">
                <property name="person" ref="person" />
        </bean>

</beans>




Now make the required changes to the descriptor files web.xml & faces-config.xml.

faces.-config.xml
Remove the <managed-bean> declaration and add the <variable-resolver> under <application>.

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

        <navigation-rule>
                <from-view-id>/pages/inputname.jspx</from-view-id>
                <navigation-case>
                         <from-outcome>greeting</from-outcome>
                         <to-view-id>/pages/greeting.jspx</to-view-id>
                </navigation-case>
        </navigation-rule>

        <!-- To be removed, Spring will take care of this
        <managed-bean>
23
               <managed-bean-name>personBean</managed-bean-name>
               <managed-bean-class>
                       com.mytutorial.PersonControllerBean
               </managed-bean-class>
               <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>

        -->
                                                         Added

        <application>
           <variable-resolver>
                org.springframework.web.jsf.DelegatingVariableResolver
            </variable-resolver>
            <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
        </application>

</faces-config>




Finally add listeners and context-param to the web.xml

web.xml:

<!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>
          <context-param>
                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                  <param-value>server</param-value>
          </context-param>
          <context-param>
                  <param-name>javax.faces.CONFIG_FILES</param-name>
24
                <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.jspx</param-value>
        </context-param>                                             Added
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>

        <!-- Special Debug Output for Development -->
        <context-param>
                 <param-name>facelets.DEVELOPMENT</param-name>
                 <param-value>true</param-value>
        </context-param>
        <!-- Optional JSF-RI Parameters to Help Debug -->
        <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>

        <listener>
              <listener-class>
                     org.springframework.web.context.ContextLoaderListener
              </listener-class>
        </listener>
                                                                          Added
        <listener>
              <listener-class>
                    org.springframework.web.context.request.RequestContextListener
              </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>
25




The URL to use after you deploy/publish and start the Tomcat server:

http://localhost:8080/simpleWeb/index.jsf


Run the application as before and you should see the same output.
This time with Spring’s dependency injection.




Please feel free to email any errors to java-interview@hotmail.com. Also stay tuned at
    http://www.lulu.com/java-success for more tutorials and Java/J2EE interview
                                        resources.

More Related Content

What's hot

Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsRaghavan Mohan
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOFMax Andersen
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorial
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorialHibernate, Spring, Eclipse, HSQL Database & Maven tutorial
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorialRaghavan Mohan
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンharuki ueno
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureArun Gupta
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservicesNilanjan Roy
 
Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Vishwash Gaur
 
Maven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherMaven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherCarlos Sanchez
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回haruki ueno
 

What's hot (20)

Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Releasing Projects Using Maven
Releasing Projects Using MavenReleasing Projects Using Maven
Releasing Projects Using Maven
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOF
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorial
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorialHibernate, Spring, Eclipse, HSQL Database & Maven tutorial
Hibernate, Spring, Eclipse, HSQL Database & Maven tutorial
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the future
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
 
Algotitmo Moinho
Algotitmo MoinhoAlgotitmo Moinho
Algotitmo Moinho
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5
 
Maven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherMaven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working Together
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回
 
Install Samples
Install SamplesInstall Samples
Install Samples
 

Viewers also liked

Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4Stefan Gehrig
 
Medication Reconciliation in Electronic Health Information Exchange
Medication Reconciliation in Electronic Health Information ExchangeMedication Reconciliation in Electronic Health Information Exchange
Medication Reconciliation in Electronic Health Information ExchangeTomasz Adamusiak
 
Proceedings online v2
Proceedings online v2Proceedings online v2
Proceedings online v2Nick Sage
 
Attack_Simulation_and_Threat_Modeling
Attack_Simulation_and_Threat_ModelingAttack_Simulation_and_Threat_Modeling
Attack_Simulation_and_Threat_ModelingOluseyi Akindeinde
 
互联网搜索技巧
互联网搜索技巧互联网搜索技巧
互联网搜索技巧bemyfriend
 
Tomislav Capan - Muzika Hr (IT Showoff)
Tomislav Capan - Muzika Hr (IT Showoff)Tomislav Capan - Muzika Hr (IT Showoff)
Tomislav Capan - Muzika Hr (IT Showoff)IT Showoff
 
Adobe Digital Publishing Suite by dualpixel
Adobe Digital Publishing Suite by dualpixelAdobe Digital Publishing Suite by dualpixel
Adobe Digital Publishing Suite by dualpixeldualpixel
 
2011 New Product Showcase
2011 New Product Showcase2011 New Product Showcase
2011 New Product Showcasebmmitt
 
Web Application Hacking 2004
Web Application Hacking 2004Web Application Hacking 2004
Web Application Hacking 2004Mike Spaulding
 
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN YiMu Exhibition Services Co.,Ltd.
 

Viewers also liked (20)

Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4
 
Medication Reconciliation in Electronic Health Information Exchange
Medication Reconciliation in Electronic Health Information ExchangeMedication Reconciliation in Electronic Health Information Exchange
Medication Reconciliation in Electronic Health Information Exchange
 
Proceedings online v2
Proceedings online v2Proceedings online v2
Proceedings online v2
 
JSF2 and JSP
JSF2 and JSPJSF2 and JSP
JSF2 and JSP
 
document
documentdocument
document
 
Attack_Simulation_and_Threat_Modeling
Attack_Simulation_and_Threat_ModelingAttack_Simulation_and_Threat_Modeling
Attack_Simulation_and_Threat_Modeling
 
Search engines
Search enginesSearch engines
Search engines
 
Xakep
XakepXakep
Xakep
 
Google
GoogleGoogle
Google
 
互联网搜索技巧
互联网搜索技巧互联网搜索技巧
互联网搜索技巧
 
Tomislav Capan - Muzika Hr (IT Showoff)
Tomislav Capan - Muzika Hr (IT Showoff)Tomislav Capan - Muzika Hr (IT Showoff)
Tomislav Capan - Muzika Hr (IT Showoff)
 
IoF South West Conference
IoF South West ConferenceIoF South West Conference
IoF South West Conference
 
Adobe Digital Publishing Suite by dualpixel
Adobe Digital Publishing Suite by dualpixelAdobe Digital Publishing Suite by dualpixel
Adobe Digital Publishing Suite by dualpixel
 
2011 New Product Showcase
2011 New Product Showcase2011 New Product Showcase
2011 New Product Showcase
 
Web Application Hacking 2004
Web Application Hacking 2004Web Application Hacking 2004
Web Application Hacking 2004
 
Ticer2005
Ticer2005Ticer2005
Ticer2005
 
Training for Foster Parents
Training for Foster ParentsTraining for Foster Parents
Training for Foster Parents
 
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN
Shanghai big tradeshow calendar 2014 collection by MARKYE@LIERJIA.CN
 
Unemployment
UnemploymentUnemployment
Unemployment
 
Catalog
CatalogCatalog
Catalog
 

Similar to JSF, Facelets, Spring-JSF & Maven

Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xmlakmini
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsRaghavan Mohan
 
Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!cyrilpicat
 
Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsSoft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsrfelden
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with MavenSid Anand
 
Introduction To Maven2
Introduction To Maven2Introduction To Maven2
Introduction To Maven2Shuji Watanabe
 
Gradle: From Extreme to Mainstream
Gradle: From Extreme to MainstreamGradle: From Extreme to Mainstream
Gradle: From Extreme to MainstreamBTI360
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and FlexJustin J. Moses
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Robert Scholte
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
 
Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipsterEueung Mulyana
 
Hibernate 5 – merge() Example
Hibernate 5 – merge() ExampleHibernate 5 – merge() Example
Hibernate 5 – merge() ExampleDucat India
 

Similar to JSF, Facelets, Spring-JSF & Maven (20)

Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xml
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
 
Apache Maven basics
Apache Maven basicsApache Maven basics
Apache Maven basics
 
Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!
 
Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsSoft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developments
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Introduction To Maven2
Introduction To Maven2Introduction To Maven2
Introduction To Maven2
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Gradle: From Extreme to Mainstream
Gradle: From Extreme to MainstreamGradle: From Extreme to Mainstream
Gradle: From Extreme to Mainstream
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and Flex
 
Pom
PomPom
Pom
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
 
AOP sec3.pptx
AOP sec3.pptxAOP sec3.pptx
AOP sec3.pptx
 
Apache Maven for AT/QC
Apache Maven for AT/QCApache Maven for AT/QC
Apache Maven for AT/QC
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipster
 
Hibernate 5 – merge() Example
Hibernate 5 – merge() ExampleHibernate 5 – merge() Example
Hibernate 5 – merge() Example
 
Sel study notes
Sel study notesSel study notes
Sel study notes
 

More from Raghavan Mohan

Accelerate with BIRT and Actuate11
Accelerate with BIRT and Actuate11Accelerate with BIRT and Actuate11
Accelerate with BIRT and Actuate11Raghavan Mohan
 
Sachin Tendulkar Resume
Sachin Tendulkar ResumeSachin Tendulkar Resume
Sachin Tendulkar ResumeRaghavan Mohan
 
Senator Barrack Obama Resume
Senator Barrack Obama ResumeSenator Barrack Obama Resume
Senator Barrack Obama ResumeRaghavan Mohan
 
23617968 digit-fast-track-jan-2009-php
23617968 digit-fast-track-jan-2009-php23617968 digit-fast-track-jan-2009-php
23617968 digit-fast-track-jan-2009-phpRaghavan Mohan
 
Quality - Douglas Crockford
Quality - Douglas CrockfordQuality - Douglas Crockford
Quality - Douglas CrockfordRaghavan Mohan
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming LanguageRaghavan Mohan
 

More from Raghavan Mohan (12)

Accelerate with BIRT and Actuate11
Accelerate with BIRT and Actuate11Accelerate with BIRT and Actuate11
Accelerate with BIRT and Actuate11
 
Who is BIRT
Who is BIRTWho is BIRT
Who is BIRT
 
Introduction to BIRT
Introduction to BIRTIntroduction to BIRT
Introduction to BIRT
 
Sachin Tendulkar Resume
Sachin Tendulkar ResumeSachin Tendulkar Resume
Sachin Tendulkar Resume
 
Manmohan Singh Resume
Manmohan Singh ResumeManmohan Singh Resume
Manmohan Singh Resume
 
Senator Barrack Obama Resume
Senator Barrack Obama ResumeSenator Barrack Obama Resume
Senator Barrack Obama Resume
 
Java/J2EE CV Guide
Java/J2EE CV GuideJava/J2EE CV Guide
Java/J2EE CV Guide
 
Java/J2EE Companion
Java/J2EE CompanionJava/J2EE Companion
Java/J2EE Companion
 
Fast Track to Ajax.
Fast Track to Ajax.Fast Track to Ajax.
Fast Track to Ajax.
 
23617968 digit-fast-track-jan-2009-php
23617968 digit-fast-track-jan-2009-php23617968 digit-fast-track-jan-2009-php
23617968 digit-fast-track-jan-2009-php
 
Quality - Douglas Crockford
Quality - Douglas CrockfordQuality - Douglas Crockford
Quality - Douglas Crockford
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 

Recently uploaded

SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameKapil Thakar
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsDianaGray10
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4DianaGray10
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 

Recently uploaded (20)

SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First Frame
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 

JSF, Facelets, Spring-JSF & Maven

  • 1. 1 The author has made every effort in the preparation of this book to ensure the accuracy of the information. However, information in this book is sold without warranty either expressed or implied. The author will not be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. JSF, Facelets, Spring-JSF & Maven Facelets is a powerful templating language built from ground up for JSF. Facelets allow for greater code reuse than JSPs. This tutorial provides an example of how to work with JSF, Facelets and Spring-JSF along with Maven-2 in Eclipse. by K. Arulkumaran & A. Sivayini Website: http://www.lulu.com/java-success Feedback email: java-interview@hotmail.com
  • 2. 2 Table Of Contents Notations ..................................................................................................................... 3 Tutorial 7 – JSF, Facelets, Maven & Eclipse...................................................... 4 Tutorial 8 – JSF, Facelets, Spring, Maven & Eclipse..................................... 19
  • 3. 3 Notations Command prompt: Eclipse: File Explorer or Windows Explorer: Internet Explorer:
  • 4. 4 Tutorial 7 – JSF, Facelets, Maven & Eclipse This tutorial will guide you through re-building tutorial-3 for simpleWeb with facelets. It assumes that you have read tutorials 1-3. The 3rd party library jar files required are: <!-- JSF/JSTL/Facelets --> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>1.2_04</version> </dependency> <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.11</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>javax.el</groupId> Provided means used for <artifactId>el-api</artifactId> compiling but no need to <version>1.0</version> package it. This is because <scope>provided</scope> the Tomcat server has this </dependency> package under its lib folder <dependency> <groupId>com.sun.el</groupId> <artifactId>el-ri</artifactId> <version>1.0</version> </dependency> Artifact el-ri (Expression Language – reference implementation) can be downloaded from the following repository and all the other jars except jsf-impl (Sun JSF RI ) should be available from the maven-2 default repository http://repo1.maven.org/maven2/. <repositories> <repository> <id>maven-repository.dev.java.net</id> <name>Java Dev Net Repository</name> <url>http://download.java.net/maven/2/</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
  • 5. 5 Step1: Download JSF 1.2_04 P02 from the site https://javaserverfaces.dev.java.net/download.html into say your download directory. Create a new folder maven_lib under your c:java folder for the special library files which you can’t download from any maven repositories. Copy the jsf-impl.jar to your “c:javamaven_lib” folder and rename it to “jsf-impl-1.2_04.jar”. Now you need to install this JSF implementation jar into your local maven repository in c:java.m2repository. To do this run the following command in a command prompt: mvn install:install-file -Dfile=jsf-impl-1.2_04.jar -DgroupId=javax.faces -DartifactId=jsf-impl - Dversion=1.2_04 -Dpackaging=jar -DgeneratePom=true After running the above command, you can check for the presence of the jsf-impl-1.2_04.jar file in your local maven 2 repository “c:java.m2repositoryjavax”.
  • 6. 6 Now the revised pom.xml file under c:tutorialssimpleWeb should look like: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven- v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mytutorial</groupId> <artifactId>simpleWeb</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>simpleWeb Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> <version>1.8</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2</version> </dependency>
  • 7. 7 <!-- JSF/JSTL/Facelets --> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>1.2_04</version> </dependency> <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.11</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.sun.el</groupId> <artifactId>el-ri</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <finalName>simpleWeb</finalName> <pluginManagement> <plugins> <plugin> Java compiler <groupId>org.apache.maven.plugins</groupId> JDK 1.5 <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> Using WTP 2.4 but <groupId>org.apache.maven.plugins</groupId> JSF 1.2 requires 2.5, <artifactId>maven-eclipse-plugin</artifactId> which is not yet <version>2.4</version> available. So refer <configuration> Step: WorkAround <downloadSources>false</downloadSources> to manually change <wtpversion>1.5</wtpversion> this value. </configuration> </plugin> </plugins> </pluginManagement> </build> <repositories> <repository>
  • 8. 8 <id>maven-repository.dev.java.net</id> <name>Java Dev Net Repository</name> <url>http://download.java.net/maven/2/</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> By default maven uses <enabled>false</enabled> http://repo1.maven.org/maven2/ </snapshots> and your local repository in </repository> c:java.m2repository. Any other </repositories> repositories need to be defined in the pom.xml file. el-i-1.0.jar can </project> be found at this repository. Note: if a particular jar file is not available in any repositories, it can be downloaded separately and installed in to your local repository c:java.m2repository using “mvn install:install-file …” as shown above. Step-2: If you are already inside eclipse, exit out of it and run the following maven command from c:tutorialssimpleWeb to generate eclipse build path (i.e. classpath). STEP: WorkAround The JSF 1.2 requires eclipse web facet 2.5. You need to open the file “org.eclipse.wst.common.project.facet.core.xml” under C:tutorialssimpleWeb.settings as shown below from version=2.4 to version=2.5. Every time you use the eclipse:clean command, you will have to manually fix this up as shown below. Step-3: Now get back into eclipse and click “F5” for refresh on the “simpleWeb” project. The required files need to be completed as shown below:
  • 9. 9 PersonBean.java (Model) package com.mytutorial; public class PersonBean { String personName; public String getPersonName() { return personName; } public void setPersonName(String personName) { this.personName = personName; } } PersonBeanController.java (Controller) package com.mytutorial; public class PersonControllerBean { PersonBean person = new PersonBean(); //later on we will inject //this using spring public String getPersonName() { return person.getPersonName(); } public void setPersonName(String personName) { person.setPersonName(personName); } public PersonBean getPerson() { return person; }
  • 10. 10 public void setPerson(PersonBean person) { this.person = person; } } messages.properties (same as before in tutorial-3) inputname_header=JSF Tutorial prompt=Tell me your name: greeting_text=Welcome to JSF button_text=Hello sign=! greeting.jspx (page) Note: The recommended extension for pages by facelets is the “.xhtml”. Since eclipse does not recognize this and would not provide you code assist when you press ctrl-Space. So the work around is to use the extension .jspx to solve this problem. These .jspx files can be opened using the webpage editor provided by eclipse 3.3 WTP. To open the greeting.jspx in a webpage editor right click on it and select “other” and then “WebPage Editor”
  • 11. 11 The completed “greeting.jspx” should look like: <?xml version="1.0" encoding="ISO-8859-1" ?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" version="2.0"> <ui:composition> <html> <head> <title>greeting page</title> </head> <body> <f:loadBundle basename="com.mytutorial.messages" var="msg" /> <h3 <h:outputText value="#{msg.greeting_text}" />, <h:outputText value="#{personBean.personName}" /> <h:outputText value="#{msg.sign}" /> </h3> Defined in faces- config.xml </body> </html> </ui:composition> </jsp:root>
  • 12. 12 inputname.jspx <?xml version="1.0" encoding="ISO-8859-1" ?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" version="2.0"> <ui:composition> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Insert title here</title> </head> <body> <f:view> <f:loadBundle basename="com.mytutorial.messages" var="msg" /> <h3> <h:form id="helloForm"> <h:outputText value="#{msg.prompt}" /> <h:inputText value="#{personBean.personName}" /> <h:commandButton action="greeting" value="#{msg.button_text}" /> <h:outputText></h:outputText> </h:form> </h3> </f:view> </body> </html> </ui:composition> </jsp:root>
  • 13. 13 faces-config.xml <?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> <navigation-rule> <from-view-id>/pages/inputname.jspx</from-view-id> <navigation-case> <from-outcome>greeting</from-outcome> <to-view-id>/pages/greeting.jspx</to-view-id> </navigation-case> </navigation-rule> Used in JSF pages <managed-bean> <managed-bean-name>personBean</managed-bean-name> <managed-bean-class> com.mytutorial.PersonControllerBean </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> </faces-config>
  • 14. 14 web.xml <!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> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.jspx</param-value> </context-param> <!-- Special Debug Output for Development --> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <!-- Optional JSF-RI Parameters to Help Debug --> <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>
  • 15. 15 </context-param> <!-- 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> Finally the “index.jspx” <?xml version="1.0" encoding="ISO-8859-1" ?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" version="2.0"> <ui:composition> <html> <body> <f:view> <a href="pages/inputname.jsf">Click Me</a> <br /> </f:view> </body>
  • 16. 16 </html> </ui:composition> </jsp:root> You can now try to build it and deploy it to tomcat as discussed in tutorial-3. Try deploying it from both inside eclipse & outside. You can check your deployed war file from inside eclipse under following folder (check if it is properly packaged): Important!!
  • 17. 17 It is important to note that, if you are deploying to Tomcat inside eclipse, remember to exclude the jar files which are already available under Tomcat’s lib directory. So you need to remove the el-api- 1.0.jar file from getting packaged. You could do this inside eclipse by right clicking on simpleWeb and then selecting “properties”. Under J2EE module dependencies make sure that el-api-1.0.jar is unticked. Only the ticked files make it to the WEB-INlib folder. If you build the war file outside eclipse then maven pom.xml file will take care of this, since its scope is declared as “provided”. The URL to use after you deploy/publish and start the Tomcat server: http://localhost:8080/simpleWeb/index.jsf
  • 18. 18 Please feel free to email any errors to java-interview@hotmail.com. Also stay tuned at http://www.lulu.com/java-success for more tutorials and Java/J2EE interview resources.
  • 19. 19 Tutorial 8 – JSF, Facelets, Spring, Maven & Eclipse This is the continuation of tutorial-7 for simpleWeb with Spring. It assumes that you have read tutorials 1-3 and tutorial 7. You need to make use of Spring with JSF: Add spring.jar to the pom.xml file under c:tutorialssimpleWeb <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.0.6</version> </dependency> After adding, save it and exit out of eclipse and run the following mvn (Maven) command from the command line. mvn eclipse:eclipse
  • 20. 20 STEP: WorkAround The JSF 1.2 requires eclipse web facet 2.5. You need to open the file “org.eclipse.wst.common.project.facet.core.xml” under C:tutorialssimpleWeb.settings as show below from version=2.4 to version=2.5. Every time you use the eclipse:clean command, you will have to manually fix this up as shown below. You can now open eclipse and refresh (i.e. F5) simpleWeb project. After this if you check your eclipse build path, it should look like below with spring-2.0.6.jar.
  • 21. 21 Also check your project facet to make sure that dynamic web module is 2.5. If not repeat step marked “Work Around” above after exiting eclipse. To use Spring make the following changes to the existing artifacts and also add the “applicationContext.xml” file under WEB-INF. PersonControllerBean.java Note the comments in bold. Spring will inject this. package com.mytutorial; public class PersonControllerBean { PersonBean person; //removed instantiation. //Spring will inject this using the setter. public String getPersonName() { return person.getPersonName(); } public void setPersonName(String personName) { person.setPersonName(personName); } public PersonBean getPerson() { return person; } public void setPerson(PersonBean person) { this.person = person; } } Let’s add the applicationContext.xml file
  • 22. 22 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <bean id="person" class="com.mytutorial.PersonBean" /> <bean id="personBean" class="com.mytutorial.PersonControllerBean" scope="session"> <property name="person" ref="person" /> </bean> </beans> Now make the required changes to the descriptor files web.xml & faces-config.xml. faces.-config.xml Remove the <managed-bean> declaration and add the <variable-resolver> under <application>. <?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> <navigation-rule> <from-view-id>/pages/inputname.jspx</from-view-id> <navigation-case> <from-outcome>greeting</from-outcome> <to-view-id>/pages/greeting.jspx</to-view-id> </navigation-case> </navigation-rule> <!-- To be removed, Spring will take care of this <managed-bean>
  • 23. 23 <managed-bean-name>personBean</managed-bean-name> <managed-bean-class> com.mytutorial.PersonControllerBean </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> --> Added <application> <variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver </variable-resolver> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> </faces-config> Finally add listeners and context-param to the web.xml web.xml: <!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> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name>
  • 24. 24 <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.jspx</param-value> </context-param> Added <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <!-- Special Debug Output for Development --> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <!-- Optional JSF-RI Parameters to Help Debug --> <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> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> Added <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </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>
  • 25. 25 The URL to use after you deploy/publish and start the Tomcat server: http://localhost:8080/simpleWeb/index.jsf Run the application as before and you should see the same output. This time with Spring’s dependency injection. Please feel free to email any errors to java-interview@hotmail.com. Also stay tuned at http://www.lulu.com/java-success for more tutorials and Java/J2EE interview resources.