I tried for two days to deploy the first prototype of effingo to my Ubuntu Server 10.04 still running Tomcat 6. Effingo is a JSF 2 Web Application using Expression Language in Version 2.2, which is not supported by Tomcat 6. It would work with Tomcat 7 but since that server also runs several other critical web applications an update is no solution. So I searched the web for a solution and was shocked by the hugh amount of outdated, wrong or confusing information on the topic. Therefore I will give a step by step explanation on how to achieve this task. While trying this I also got the whole project to run on an embedded Glassfish 3 Web Application container and updated my embedded Jetty Server to the most recent version. I will give explanations on how to achieve this too. That way it is easy to quickly test a web application under several different application servers.
The tutorial is based on the best tutorial I could find on the web which is located here and the only working solution for getting JSF 2.0 applications to work with Tomcat 6 which is located here.
I used the helloworld project developed by Makariev in his tutorial. This is some simple code using basic JSF 2.0 features. Most important for me was the ability to use parameters inside Expression Language statements like
#{hi.greetFrom('initial page')}
You can download this project as zip archive or from an SVN repository.
You can already try to run this project from using one of the following three commands:
$ mvn package tomcat:run-war $ mvn package jetty:run-war $ mvn package -Pglassfish
All of them will fail with some error. To solve these issues we need to edit the dependencies in the pom.xml and some entries in web.xml so our application is able to find the correct classes. Let’s look at the modified pom.xml at first.
<?xml version="1.0" encoding="UTF-8"?>
<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.googlecode.sandcode</groupId>
<artifactId>helloworld</artifactId>
<packaging>war</packaging>
<name>${project.artifactId}</name>
<url>http://dmakariev.blogspot.com/2009/12/jsf-20-with-maven-2-plugins-for.html</url>
<version>1.0</version>
<developers>
<developer>
<name>Dimitar Makariev</name>
<email>dimitar.makariev at gmail.com</email>
<url>http://dmakariev.blogspot.com/</url>
</developer>
</developers>
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>src/main/java</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>java.net.m2</id>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>java.net.glassfish.m2</id>
<url>http://download.java.net/maven/glassfish</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>java.net.glassfish.m2</id>
<url>http://download.java.net/maven/glassfish</url>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>default</id>
<!-- Tests are disabled by default. See the test profile -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<!-- Embedded Jetty (jetty:run-war) -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<!-- force friendly name instead of artifact name + version -->
<contextPath>${project.build.finalName}</contextPath>
<!-- This parameter will auto-deploy modified classes. -->
<!-- You can save changes in a file or class and refresh your browser to view the changes. -->
<scanIntervalSeconds>3</scanIntervalSeconds>
</configuration>
</plugin>
<!-- Embedded Tomcat (package tomcat:run) -->
<!-- Standalone Tomcat (package tomcat:deploy) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/${project.build.finalName}</path>
<!-- Embedded port -->
<port>8080</port>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>[2.0.1,)</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>[2.0.1,)</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</profile>
<!-- embedded Glassfish v3 ( -Pglassfish ) -->
<profile>
<id>glassfish</id>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.glassfish</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<app>${project.build.directory}/${build.finalName}.war</app>
<port>8080</port>
<contextRoot>${build.finalName}</contextRoot>
<autoDelete>true</autoDelete>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
I applied the following modifications to make it run:
- Renamed artifactId of Jetty plugin from maven-jetty-plugin to jetty-maven-plugin. The second one uses the most recent version (8 instead of 6) from March 2012.
- I removed the connectors section since it does not work with the new Jetty plugin and is not necessary anyways.
- I changed the srtifactId of the Tomcat plugin from tomcat-maven-plugin to tomcat6-maven-plugin since the new version of the plugin is separated into one for tomcat6 and one for tomcat7. If you need both just insert both plugins. For running you just need to add the number to the maven mojo. For example tomcat6:run.
- I also added the newest version tag to the tomcat plugin which is 2.0-beta-1. Altough this is beta it runs pretty stable.
- I added scope provided to the dependency for the el-api dependency. I’ll this step later.
- According to one of the comments from the tutorial this article is based on I added the jstl 1.2 dependency. This is necessary, because the server will not be able to interprete the jstl namespace if you don’t and the probability is high that you will need jstl for any little more complex project anyways.
- To enable embedded Glassfish support I updated the version of the embedded Glassfish plugin from 3.0 to 3.1.1. In 3.0 is a bug that will prevent our project from running.
- Also according to some comments on the original tutorials page I changed the Glassfish el-api dependency to the javaee-web-api. This includes all dependencies necessary for the Glassfish web profile which mirrors the functionality of Tomcat and Jetty on Glassfish.
The second important file is the web.xml. After my modifications it looks like:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!-- 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>
<!-- explicitly setting the EL factory, otherwise is not working correctly under tomcat and jetty -->
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- welcome file mapping -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
In detail I applied the following modification:
- Added the ConfigureListener. This is necessary for Glassfish to load the Faces Servlet correctly.
That was the only necessary modification to web.xml. Jetty and Glassfish now run fine as embedded version. The only server still not working is Tomcat6. I did not manage to make it run as embedded version but fortunately there also is a mvn tomcat6:deploy mojo that deploys an application to a running Tomcat6 server.
To get the deployment mojo work you need to exchange the jar file in the Tomcat6 lib folder for the updated 2.2 version. There are many tipps on the web telling you you also need to exchange the implementation (jasper-el.jar). Don’t do this. The implementation comes bundled with your web app. Just exchange the el-api.jar for an updated version (I got mine from my local maven repository as el-api-2.2.jar) and set the scope of the el-api dependency to provided as explained. That should do the trick. In addition the el-impl.jar in version 2.2 is added as maven dependency with scope runtime to the Jetty/Tomcat profile of the pom.xml. That way we still can not do tomcat6:run but at least deploy to a running Tomcat instance. To run an embedded Tomcat it would be necessary to tell that embedded version to exchange its el-api.jar somehow which I could not figure out yet.
by klemens at April 13, 2012 08:38 PM
On behalf of the Federal Ministry of Economics and Technology, Stefan Kapferer, state secretary, opened the event. He laid special attention on the fact that THESEUS had primarily concentrated on areas of growth such as software, medical engineering, and media. Prof. Dr. Hans-Jörg Bullinger, President of Fraunhofer, said: “A variety of patents, innovative business models, state-of-the-art services and technologies have been created in THESEUS that opens up totally new possibilities especially for SMEs.” Henning Kagermann, former CEO of SAP, emphasized that the results of the THESEUS project are an important contribution to a web-based service and knowledge society.
At the closing congress, Thomas Widenka, Vice President and COO, as well as Martin Przewloka, Head of the IA&S practice, delivered lectures with special focus on the exploitation of the research results. During the pre-congress which took place on February 13, the participants had the possibility to get a closer look of USDL in a tutorial.
Overall SAP Research was able to draw a positive assessment about the THESEUS project. You can find a detailed documentation of the lectures on the closing congress 




Going from proof-of-concept prototypes to usable applications requires some programming and maintenance effort. This is typically not directly on our agenda, but in selected cases we
choose this route for increasing the impact through brave adopters. The recently started PyQt GUI shown here gives a good impression on how desktop users will be able to
mix and match suitable resource service providers.
This tool will soon be combined with the 





