https://issues.apache.org/jira/browse/EXTSCRIPT-158 moving to jetty 8 and isolating the blogging example for easier debugging

git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk@1302412 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-examples/blog-example/pom.xml b/extscript-examples/blog-example/pom.xml
new file mode 100644
index 0000000..c3dab60
--- /dev/null
+++ b/extscript-examples/blog-example/pom.xml
@@ -0,0 +1,92 @@
+<?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">
+
+    <parent>
+        <artifactId>extscript-examples</artifactId>
+        <groupId>org.apache.myfaces.extensions.scripting</groupId>
+        <version>1.0.3-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.myfaces.extensions.scripting</groupId>
+    <artifactId>blog-example</artifactId>
+    <packaging>war</packaging>
+    <name>A custom project using myfaces 2.0</name>
+    <version>1.0.3-SNAPSHOT</version>
+    <url>http://www.apache.org</url>
+
+    <scm>
+        <connection>
+            scm:svn:http://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example
+        </connection>
+        <developerConnection>
+            scm:svn:https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example
+        </developerConnection>
+        <url>http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-example</url>
+    </scm>
+
+    <repositories>
+        <repository>
+            <id>jboss</id>
+            <url>http://repository.jboss.com/maven2/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+
+    </repositories>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+
+
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+            <version>${myfaces2.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-impl</artifactId>
+            <version>${myfaces2.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.scripting</groupId>
+            <artifactId>extscript-core</artifactId>
+            <version>1.0.3-SNAPSHOT</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.myfaces.tomahawk</groupId>
+            <artifactId>tomahawk</artifactId>
+            <version>1.1.6</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <artifactId>jstl</artifactId>
+                    <groupId>javax.servlet</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/faces-config.xml b/extscript-examples/blog-example/src/main/webapp/WEB-INF/faces-config.xml
new file mode 100644
index 0000000..8641883
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/faces-config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<faces-config 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_2_0.xsd"
+              version="2.0">
+    <managed-bean>
+        <managed-bean-name>javaBlogView</managed-bean-name>
+        <managed-bean-class>blog.Blog</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+</faces-config>
\ No newline at end of file
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BaseInterface.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BaseInterface.java
new file mode 100644
index 0000000..88fe252
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BaseInterface.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+/**
+ * Base interface to test inheritance detection
+ *
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public interface BaseInterface {
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/Blog.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/Blog.java
new file mode 100644
index 0000000..3a40a38
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/Blog.java
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+import java.util.logging.Logger;
+
+import static blog.JSFUtilJava.resolveVariable;
+
+/**
+ * Our Blog View controller
+ * (note we have a dummy annotation here for testing purposes)
+ *
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+@DependencyTestAnnotation
+public class Blog {
+
+    
+    String title = "<h3>Hello to the MyFaces Dynamic Blogging Example</h3>";
+    String title1 = "You can alter the code for this small blogging application on the fly, " +
+            "you even can add new classes on the fly and Java will pick it up";
+
+    String firstName = "";
+    String lastName = "";
+    String topic = "";
+
+    String content = "";
+
+    private Logger getLog() {
+        return Logger.getLogger(this.getClass().getName());
+    }
+
+    public String addEntry() {
+        getLog().info("adding entry");
+        
+        /*important we have an indirection over an interface here*/
+        BlogServiceInterface service = (BlogServiceInterface) resolveVariable("javaBlogService");
+
+        if (service == null) {
+            getLog().severe("service not found");
+        } else {
+            getLog().fine("service found");
+        }
+
+        BlogEntry entry = new BlogEntry();
+        //we now map it in the verbose way, the lean way would be to do direct introspection attribute mapping
+
+        entry.setFirstName(firstName);
+        entry.setLastName(lastName);
+        entry.setTopic(topic);
+        
+        entry.setContent(content);
+
+        if (service != null) {
+            /*convenience method to call a method on an object dynamically
+            * executeMethod and cast are static imports which encapsulates the
+            * ugly stuff the java introspection provides and reduce
+            * the loc down to sane levels
+            *
+            * note the behavior in case of calling errors
+            * is changed from the default managed behavior
+            * to an unmanaged behavior. This is mostly
+            * the same behavior you get from scripting engines!
+            * 
+            */
+
+            //include for presentation 3
+            //entry.setTopic(debuggingTest());
+              
+            service.addEntry(entry);
+        }
+
+        //we stay on the same page
+        return null;
+    }
+
+    //include for presentation 3
+    /*public String debuggingTest() {
+        return "Debugging Topic set via dynamic code";
+    }*/
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle1() {
+        return title1;
+    }
+
+    public void setTitle1(String title1) {
+        this.title1 = title1;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getTopic() {
+        return topic;
+    }
+
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+  
+
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogEntry.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogEntry.java
new file mode 100644
index 0000000..8f63934
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogEntry.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+/**
+ * Domain object for our mini blogging example
+ * Holds the entered blogging data
+ */
+
+public class BlogEntry {
+
+
+    String firstName = "";
+    String lastName = "";
+    String topic = "";
+    String content = "";
+    
+    public String getFirstName() {
+        return firstName+"aaa";
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getTopic() {
+        return topic;
+    }
+
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogService.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogService.java
new file mode 100644
index 0000000..52582f5
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogService.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Application scoped bean (defined in the faces-config for testing purposes)
+ * which stores the blog entries
+ */
+@ManagedBean(name="javaBlogService")
+@ApplicationScoped
+public class BlogService implements BlogServiceInterface {
+
+    List<Object> blogEntries = Collections.synchronizedList(new LinkedList<Object>());
+
+    /**
+     * Add an entry to our blogging list
+     * Note: we have a testing annotation,
+     * which does nothing, it is there for testing
+     * purposes only
+     *
+     * @param entry the entry to be added
+     */
+    @DependencyTestAnnotation
+    public void addEntry(BlogEntry entry) {
+       if (entry != null) {
+            blogEntries.add(entry);
+        }
+    }
+
+    public List<Object> getBlogEntries() {
+        return blogEntries;
+    }
+
+    public void setBlogEntries(List<Object> blogEntries) {
+        this.blogEntries = blogEntries;
+    }
+
+    
+
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogServiceInterface.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogServiceInterface.java
new file mode 100644
index 0000000..5208d6f
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/BlogServiceInterface.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+/**
+ * Test for indirect dependency over interfaces
+ */
+public interface BlogServiceInterface extends BaseInterface {
+
+    public void addEntry(BlogEntry entry);
+    
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/DependencyTestAnnotation.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/DependencyTestAnnotation.java
new file mode 100644
index 0000000..127d4cb
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/DependencyTestAnnotation.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+import java.lang.annotation.*;
+
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface DependencyTestAnnotation {
+
+}
\ No newline at end of file
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/JSFUtilJava.java b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/JSFUtilJava.java
new file mode 100644
index 0000000..614a6ac
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/java/blog/JSFUtilJava.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package blog;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.faces.context.FacesContext;
+
+
+/**
+ * @author werpu2
+ * @date: 01.09.2009
+ * <p/>
+ * A helper for JSF and introspection related tasks
+ */
+public class JSFUtilJava {
+
+    public JSFUtilJava() {
+    }
+
+    /**
+     * resolves a variable in the current facesContext
+     *
+     * @param beanName
+     * @return
+     */
+    public static Object resolveVariable(String beanName) {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+
+        ELContext elContext = facesContext.getELContext();
+        ELResolver elResolver =elContext.getELResolver();
+
+        return elResolver.getValue(elContext, null, beanName);
+    }
+
+}
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml b/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..0dc21fe
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<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">
+
+
+    <description>Webproject.xml</description>
+
+
+    <context-param>
+        <description>
+            Initializes the plugins for our groovy handlers
+        </description>
+        <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
+        <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
+        </param-value>
+    </context-param>
+
+
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Development</param-value>
+    </context-param>
+
+    <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
+        <param-value>
+            /Users/werpu2/development/workspace/extscript_trunk/extscript-examples/blog-example/src/main/webapp/WEB-INF/groovy
+        </param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
+        <param-value>
+            /Users/werpu2/development/workspace/extscript_trunk/extscript-examples/blog-example/src/main/webapp/WEB-INF/java
+        </param-value>
+    </context-param>
+
+    <context-param>
+        <description>resource paths for our custom JSF2 resource resolver</description>
+        <param-name>org.apache.myfaces.extensions.scripting.resources.LOADER_PATHS</param-name>
+        <param-value>
+            /Users/werpu2/development/workspace/extscript_trunk/extscript-examples/blog-example/src/main/webapp
+        </param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>State saving method: "client" or "server" (= default)
+            See JSF Specification 2.5.3
+        </description>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>server</param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>a redirecting Facelet resource resolver which allows to pick up templates and resources from our
+            source dir
+        </description>
+        <param-name>facelets.RESOURCE_RESOLVER</param-name>
+        <param-value>org.apache.myfaces.extensions.scripting.jsf.facelet.MyFacesReroutingResourceResolver</param-value>
+    </context-param>
+
+    <filter>
+        <filter-name>scriptingFilter</filter-name>
+        <filter-class>org.apache.myfaces.extensions.scripting.core.servlet.ScriptingServletFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>scriptingFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+        <dispatcher>INCLUDE</dispatcher>
+        <dispatcher>ERROR</dispatcher>
+    </filter-mapping>
+
+    <!--
+    Note, this servlet filter is vital without it Ext-Scripting will not work,
+    if you do not set it you will get an appropriate warning in the command line
+    -->
+    <!-- Listener, to allow Jetty serving MyFaces apps -->
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</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>
+
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>/faces/*</url-pattern>
+    </servlet-mapping>
+
+
+    <!-- Welcome files -->
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>
diff --git a/extscript-examples/blog-example/src/main/webapp/javablog.xhtml b/extscript-examples/blog-example/src/main/webapp/javablog.xhtml
new file mode 100644
index 0000000..e3efbd8
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/javablog.xhtml
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:c="http://java.sun.com/jsp/jstl/core">
+<h:head>
+    <title>Hello World</title>
+</h:head>
+
+<body>
+<ui:composition template="/template.xhtml">
+
+    <ui:define name="body">
+        <h:outputScript name="jsf.js" library="javax.faces"
+                        target="head"/>
+
+        <h1>
+            <ui:insert name="title">
+                Ext-Scripting Javablog Example
+
+            </ui:insert>
+        </h1>
+        <h:panelGroup  styleClass="stdBoxBig" style="color:black;">
+            <h2>In this example you can blog simply by entering text in the fields below and send submit</h2>
+
+            <p>You can change the blogging artifacts on the fly, all the sources can be found under
+                <b>WEB-INF/java/org/apache/myfaces/javaloader/blog/</b> in your deployment directory</p>
+
+        </h:panelGroup>
+
+        <h:form id="form">
+            <div class="left" style="margin-top: 3px;">
+
+
+                <h:panelGrid id="grid" columns="1" styleClass="stdBox">
+
+                    <h:outputFormat id="title1" escape="false" styleClass="title" value="#{javaBlogView.title}"/>
+                    <h:outputFormat id="title11" escape="false" styleClass="title1" value="#{javaBlogView.title1}"/>
+                    <hr/>
+                    <h:panelGrid columns="2" columnClasses="label, input">
+                        <h:outputText value="First Name"/>
+                        <h:inputText value="#{javaBlogView.firstName}"/>
+                        <h:outputText value="Last Name"/>
+                        <h:inputText value="#{javaBlogView.lastName}"/>
+                        <h:outputText value="Topic of entry"/>
+                        <h:inputText value="#{javaBlogView.topic}"/>
+                    </h:panelGrid>
+                    <h:panelGrid columns="2" columnClasses="label, input">
+                        <h:outputText styleClass="label" value="Content"/>
+                        <h:inputTextarea value="#{javaBlogView.content}"/>
+                    </h:panelGrid>
+                    <hr/>
+                    <h:commandButton styleClass="btn" action="#{javaBlogView.addEntry}" value="Add Blog Entry">
+                        <f:ajax execute="@form" render="content"/>
+                    </h:commandButton>
+                </h:panelGrid>
+            </div>
+            <h:panelGrid id="content" columns="1" styleClass="right">
+                <ui:repeat value="#{javaBlogService.blogEntries}" var="item">
+                    <h:panelGrid columns="1" styleClass="messageBox">
+                        <h:panelGroup styleClass="topic">
+                            <h:outputLabel styleClass="label" value="Topic"/>
+                            <h:outputText value="#{item.topic}"/>
+                        </h:panelGroup>
+                        <h:panelGroup styleClass="content">
+                            <h:outputLabel styleClass="label" value="Content"/>
+                            <h:outputFormat escape="false" value="#{item.content}"/>
+                        </h:panelGroup>
+                    </h:panelGrid>
+                </ui:repeat>
+            </h:panelGrid>
+        </h:form>
+    </ui:define>
+</ui:composition>
+</body>
+</html>
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/greet/greet.xhtml b/extscript-examples/blog-example/src/main/webapp/resources/greet/greet.xhtml
new file mode 100644
index 0000000..a2904c8
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/greet/greet.xhtml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:composite="http://java.sun.com/jsf/composite">
+<head>
+    <title>My First Composite Component</title>
+</head>
+<body>
+
+<composite:interface>
+    <composite:attribute name="who"/>
+</composite:interface>
+
+<composite:implementation>
+    <h:outputText value="Hello composite change, #{cc.attrs.who}!"/>
+</composite:implementation>
+
+</body>
+</html>
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/greet/greet2.xhtml b/extscript-examples/blog-example/src/main/webapp/resources/greet/greet2.xhtml
new file mode 100644
index 0000000..3663cf0
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/greet/greet2.xhtml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:composite="http://java.sun.com/jsf/composite">
+<head>
+    <title>My First Composite Component</title>
+</head>
+<body>
+
+<composite:interface>
+    <composite:attribute name="who"/>
+</composite:interface>
+
+<composite:implementation>
+    <h:outputText value="Hello  composite  greet2, #{cc.attrs.who}!"/>
+</composite:implementation>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/img/gradient1.jpg b/extscript-examples/blog-example/src/main/webapp/resources/img/gradient1.jpg
new file mode 100644
index 0000000..6987743
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/img/gradient1.jpg
Binary files differ
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/img/gradient2.png b/extscript-examples/blog-example/src/main/webapp/resources/img/gradient2.png
new file mode 100644
index 0000000..d10bdcc
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/img/gradient2.png
Binary files differ
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/img/license.txt b/extscript-examples/blog-example/src/main/webapp/resources/img/license.txt
new file mode 100644
index 0000000..507e05e
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/img/license.txt
@@ -0,0 +1,6 @@
+sig07-009_mac.jpg is from the nasa public domain image archive.
+
+http://www.nasaimages.org/luna/servlet/detail/nasaNAS~12~12~64153~168545:Multiwavelength-M81?qvq=q:galaxy+or+constellation+or+hubble+or+spitzer;lc:NVA2~35~35,NVA2~32~32,NVA2~31~31,NVA2~19~19,nasaNAS~16~16,nasaNAS~2~2,NSVS~3~3,nasaNAS~9~9,NVA2~4~4,NVA2~15~15,NVA2~24~24,NVA2~29~29,nasaNAS~12~12,nasaNAS~8~8,nasaNAS~7~7,NVA2~22~22,nasaNAS~10~10,NVA2~13~13,NVA2~18~18,NVA2~27~27,NVA2~9~9,NVA2~1~1,nasaNAS~6~6,NVA2~25~25,NVA2~20~20,nasaNAS~13~13,nasaNAS~22~22,NVA2~16~16,NVA2~8~8,nasaNAS~5~5,nasaNAS~4~4,NVA2~28~28,NVA2~14~14,nasaNAS~20~20,NVA2~17~17,NVA2~30~30,NVA2~21~21,NVA2~26~26,NVA2~23~23,NVA2~44~44,NVA2~42~42,NVA2~38~38,NVA2~45~45,NVA2~39~39,NVA2~43~43,NVA2~41~41,NVA2~37~37,NVA2~49~49,NVA2~53~53,NVA2~51~51,NVA2~56~56,NVA2~47~47,NVA2~54~54,NVA2~33~33,NVA2~36~36,NVA2~34~34,NVA2~57~57,NVA2~52~52,NVA2~48~48,NVA2~50~50,NVA2~46~46,NVA2~55~55&mi=0&trs=8854
+
+license
+http://www.nasa.gov/audience/formedia/features/MP_Photo_Guidelines.html
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/img/sig07-009_mac.jpg b/extscript-examples/blog-example/src/main/webapp/resources/img/sig07-009_mac.jpg
new file mode 100644
index 0000000..42f8ca6
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/img/sig07-009_mac.jpg
Binary files differ
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/styles/compilerWindow.css b/extscript-examples/blog-example/src/main/webapp/resources/styles/compilerWindow.css
new file mode 100644
index 0000000..0e98754
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/styles/compilerWindow.css
@@ -0,0 +1,15 @@
+div#menu {
+    display: none;
+}
+
+div.centerDiv {
+    width: auto;
+}
+
+div.errorBox {
+    width: auto;
+}
+
+div.errorBox .line {
+    width: auto;
+}
\ No newline at end of file
diff --git a/extscript-examples/blog-example/src/main/webapp/resources/styles/main.css b/extscript-examples/blog-example/src/main/webapp/resources/styles/main.css
new file mode 100644
index 0000000..c7109cc
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/resources/styles/main.css
@@ -0,0 +1,268 @@
+body {
+    background-color: white;
+}
+
+div.centerDiv {
+    margin-left: auto;
+    margin-right: auto;
+    width: 900px;
+}
+
+div.centerDiv form {
+    position: relative;
+}
+
+h1 {
+    color: #9999ff;
+    text-align: center;
+}
+
+div#backGroundFloat {
+    position: fixed;
+    z-index: -1;
+    background-color: black;
+    left: 0px;
+    top: 0px;
+    width: 100%;
+    height: 100%;
+    background-image: url("../resources/img/sig07-009_mac.jpg");
+    background-repeat: no-repeat;
+    overflow: hidden;
+}
+
+#hello {
+    background-color: yellow;
+}
+
+.stdBox, .stdBoxBig, .messageBox {
+    display: block;
+    width: 400px;
+    border: 1px solid white;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    padding: 5px;
+    border-radius: 8px;
+    background-repeat: repeat-x;
+    margin-bottom: 5px;
+    min-height: 120px;
+
+}
+
+.stdBoxBig {
+    width: 800px;
+}
+
+.stdBox, .stdBoxBig {
+    background-color: white;
+    background-image: url("../resources/img/gradient1.jpg");
+}
+
+.messageBox {
+    background-image: url("../resources/img/gradient2.png");
+}
+
+/*=================================================
+Standard Menu
+===================================================*/
+div#menu {
+    background-color: white;
+    opacity: 0.9;
+    position: absolute;
+    left: 0px;
+    top: 0px;
+    width: 100%;
+    padding: 5px;
+    font-weight: bold;
+
+}
+
+div#menu a {
+    color: blue;
+    margin-right: 10px;
+}
+
+div#menu a:hover {
+    color: red;
+}
+
+/*==================================================
+    Basic CSS information for our
+    taint history component
+    we do not use the compound
+    css for error and history
+    for readability reasons
+    although we have  load
+    of duplication here
+====================================================*/
+
+div.historyBox {
+    width: 820px;
+    heigh: 200px;
+
+    display: block;
+    overflow: auto;
+    border: 1px solid white;
+    color: #dedddd;
+    opacity: 0.92;
+
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 5px;
+
+    padding: 5px;
+    margin-left: 10px;
+
+    background-image: url("../resources/img/gradient2.png");
+    background-repeat: repeat-x;
+}
+
+div.historyBox .line {
+    display: table;
+    width: 780px;
+
+    border: 1px dashed black;
+    background-color: #ccccff;
+    color: black;
+    padding: 5px;
+    margin-top: 10px;
+    margin-left: auto;
+    margin-right: auto;
+    -moz-border-radius: 5px;
+    -webkit-border-radius: 5px;
+
+    border-radius: 5px;
+}
+
+div.historyBox .line .timestamp {
+    width: 120px;
+    float: left;
+    color: red;
+}
+
+div.historyBox .line .changedFile {
+    width: 650px;
+    overflow: hidden;
+    display: block;
+    float: left;
+}
+
+/*==================================================
+    Basic CSS information for our compiler
+    output component
+====================================================*/
+
+div.errorsLabel {
+    font-size: large;
+    padding-top: 5px;
+    padding-bottom: 10px;
+    padding-left: 5px;
+}
+
+div.warningsLabel {
+    font-size: large;
+    padding-top: 5px;
+    padding-bottom: 10px;
+    padding-left: 5px;
+    width: 100%;
+    margin-top: 10px;
+    border-top: 1px solid black;
+}
+
+div.errorBox {
+    width: 820px;
+    heigh: 200px;
+
+    display: block;
+    overflow: auto;
+    border: 1px solid white;
+    color: #dedddd;
+    opacity: 0.92;
+
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 5px;
+
+    padding: 5px;
+    margin-left: 10px;
+
+    background-image: url("../resources/img/gradient2.png");
+    background-repeat: repeat-x;
+}
+
+div.errorBox .line {
+    display: table;
+    width: 780px;
+
+    border: 1px dashed black;
+    background-color: #ccccff;
+    color: black;
+    padding: 5px;
+    margin-top: 10px;
+    margin-left: auto;
+    margin-right: auto;
+    -moz-border-radius: 5px;
+    -webkit-border-radius: 5px;
+
+    border-radius: 5px;
+}
+
+div.errorBox .line .lineNo {
+    width: 40px;
+    float: left;
+    color: red;
+}
+
+div.errorBox .line .lineNo {
+    width: 30px;
+    float: left;
+    padding-left: 5px;
+    font-weight: bold;
+    font-size: large;
+}
+
+div.errorBox .line .message {
+    width: 738px;
+    display: block;
+    float: left;
+}
+
+.left {
+    position: absolute;
+    left: 10px;
+    top: 20px;
+}
+
+.right {
+    position: absolute;
+    left: 430px;
+    top: 20px;
+}
+
+.label {
+    font-weight: bold;
+    color: black;
+    width: 150px;
+    padding-right: 5px;
+}
+
+.input input, .input textArea {
+    width: 200px;
+}
+
+input, textArea {
+    border: 1px solid black;
+}
+
+input:focus, textArea:focus {
+    background-color: yellow;
+}
+
+input.btn {
+    width: 100px;
+    margin-left: 263px;
+}
+
+
+.celltop {
+    vertical-align:top;
+}
\ No newline at end of file
diff --git a/extscript-examples/blog-example/src/main/webapp/template.xhtml b/extscript-examples/blog-example/src/main/webapp/template.xhtml
new file mode 100644
index 0000000..4f4f4e9
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/template.xhtml
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:exs="http://myfaces.apache.org/ext-scripting"
+      xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <title>Myfaces Example Facelets</title>
+    <link type="text/css" rel="stylesheet" href="#{resource['styles:main.css']}"/>
+    <ui:insert name="additionalHeadIncludes">
+    </ui:insert>    
+</h:head>
+
+<h:body>
+    <div id="menu">
+        <h:panelGroup>
+            <h:outputLink value="./helloWorld.jsf">Hello world Example</h:outputLink>
+            <h:outputLink value="./blog.jsf">Groovy Blogging Example</h:outputLink>
+            <h:outputLink value="./javablog.jsf">Java Blogging Example</h:outputLink>
+            <h:outputLink value="./componentTest.jsf">Component Testcase</h:outputLink>
+            <h:outputLink value="./compilerWindow.jsf" target="_blank">Compiler Output</h:outputLink>
+        </h:panelGroup>
+    </div>
+
+    <div id="backGroundFloat">
+    </div>
+    <div class="centerDiv">
+        <h:panelGroup>
+            <h3>
+                <h:outputFormat value="Compiler Output" escape="false"/>
+            </h3>
+            <exs:compilerOutput errorsLabel="Errors:" warningsLabel="Warnings:" scriptingLanguage=""/>
+        </h:panelGroup>
+        <h:panelGroup>
+            <h3>
+                <h:outputFormat value="Change History" escape="false"/>
+            </h3>
+            <exs:taintHistory noEntries="5"/>
+        </h:panelGroup>
+
+        <p>
+            <ui:insert name="body">Hello World Example!</ui:insert>
+        </p>
+    </div>
+</h:body>
+
+</html>
diff --git a/extscript-examples/blog-example/src/main/webapp/template2.xhtml b/extscript-examples/blog-example/src/main/webapp/template2.xhtml
new file mode 100644
index 0000000..61d42e5
--- /dev/null
+++ b/extscript-examples/blog-example/src/main/webapp/template2.xhtml
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:grv="http://myfaces.apache.org/groovy"
+      xmlns:h="http://java.sun.com/jsf/html">
+<head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+    <title>Myfaces Example Facelets</title>
+
+    <link type="text/css" rel="stylesheet" href="#{resource['styles:main.css']}"/>
+</head>
+
+<body>
+
+<h:panelGroup>
+    <h3>
+        <h:outputFormat value="Compiler Output" escape="false"/>
+    </h3>
+    <grv:compilerOutput errorsLabel="Errors:" warningsLabel="Warnings:" scriptingLanguage=""/>
+</h:panelGroup>
+
+
+<h1>
+    <ui:insert name="title">Component Testcase</ui:insert>
+</h1>
+
+
+<p>
+    <ui:insert name="body">Hello World Example!</ui:insert>
+</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
index 7d438f4..7d438df 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
@@ -49,13 +49,13 @@
         <managed-bean-class>org.apache.myfaces.javaloader.blog.Blog</managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
-
+   <!--
     <managed-bean>
         <managed-bean-name>javaBlogService</managed-bean-name>
         <managed-bean-class>org.apache.myfaces.javaloader.blog.BlogService</managed-bean-class>
         <managed-bean-scope>application</managed-bean-scope>
     </managed-bean>
-
+    -->
     <application>
         <navigation-handler>
             org.apache.myfaces.groovyloader.test.TestNavigationHandler
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy
index cd829bb..a929562 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy
@@ -26,8 +26,7 @@
   String firstName = ""
   String lastName = ""
   String topic = ""
-  String content = ""
-
+  String content = "ddddddd"
 
   public String getTopic() {
     return topic;
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy
index c21d1fa..259f8a2 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogService.groovy
@@ -44,7 +44,7 @@
     
     Logger log = Logger.getLogger(BlogService.class.getName())
     log.info("Adding entry, topic: " + entry.topic)
-    entry.topic = "bla bla2"
+    //entry.topic = "bla bla2"
     blogEntries.add(entry)
 
     log.info("blogentries size" + blogEntries.size())
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java
index 673e8df..64f5408 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java
@@ -18,19 +18,24 @@
  */
 package org.apache.myfaces.javaloader.blog;
 
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
 /**
  * Domain object for our mini blogging example
  * Holds the entered blogging data
  */
+
 public class BlogEntry {
 
+
     String firstName = "";
     String lastName = "";
     String topic = "";
     String content = "";
     
     public String getFirstName() {
-        return firstName;
+        return firstName+"aaa";
     }
 
     public void setFirstName(String firstName) {
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogService.java b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogService.java
index 1420944..928b8f1 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogService.java
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.javaloader.blog;
 
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -26,6 +28,8 @@
  * Application scoped bean (defined in the faces-config for testing purposes)
  * which stores the blog entries
  */
+@ManagedBean(name="javaBlogService")
+@ApplicationScoped
 public class BlogService implements BlogServiceInterface {
 
     List<Object> blogEntries = Collections.synchronizedList(new LinkedList<Object>());
@@ -38,11 +42,9 @@
      *
      * @param entry the entry to be added
      */
-
     @DependencyTestAnnotation
     public void addEntry(BlogEntry entry) {
        if (entry != null) {
-			entry.setContent("hello world dlskjfgls kdj");
             blogEntries.add(entry);
         }
     }
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
index 1ee0812..a4d328d 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
@@ -69,7 +69,7 @@
                 </h:panelGrid>
             </div>
             <h:panelGrid id="content" columns="1" styleClass="right">
-                <c:forEach items="#{blogService.blogEntries}" var="item">
+                <ui:repeat value="#{blogService.blogEntries}" var="item">
                     <h:panelGrid columns="1" styleClass="messageBox">
                         <h:panelGroup styleClass="topic">
                             <h:outputLabel styleClass="label" value="Topic"/>
@@ -81,7 +81,7 @@
                         </h:panelGroup>
                     </h:panelGrid>
                     <br/>
-                </c:forEach>
+                </ui:repeat>
             </h:panelGrid>
         </h:form>
     </ui:define>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
index be4aee7..ad24f80 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
@@ -75,7 +75,7 @@
                 </h:panelGrid>
             </div>
             <h:panelGrid id="content" columns="1" styleClass="right">
-                <c:forEach items="#{javaBlogService.blogEntries}" var="item">
+                <ui:repeat value="#{javaBlogService.blogEntries}" var="item">
                     <h:panelGrid columns="1" styleClass="messageBox">
                         <h:panelGroup styleClass="topic">
                             <h:outputLabel styleClass="label" value="Topic"/>
@@ -86,8 +86,7 @@
                             <h:outputFormat escape="false" value="#{item.content}"/>
                         </h:panelGroup>
                     </h:panelGrid>
-                    <br/>
-                </c:forEach>
+                </ui:repeat>
             </h:panelGrid>
         </h:form>
     </ui:define>
diff --git a/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml b/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
index 51c1f00..7111445 100644
--- a/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
+++ b/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
@@ -35,7 +35,7 @@
             Initializes the plugins for our groovy handlers
         </description>
         <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
-        <param-value>org.apache.myfaces.extensions.scripting.servlet.StartupServletContextPluginChainLoader
+        <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
         </param-value>
     </context-param>
 
diff --git a/extscript-examples/pom.xml b/extscript-examples/pom.xml
index 6f98028..97839b6 100644
--- a/extscript-examples/pom.xml
+++ b/extscript-examples/pom.xml
@@ -30,11 +30,11 @@
         <plugins>
             <plugin>
                 <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-                <version>6.1.12</version>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <version>8.1.2.v20120308</version>
                 <configuration>
                     <connectors>
-                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                             <port>9090</port>
                             <maxIdleTime>60000</maxIdleTime>
                         </connector>
@@ -51,7 +51,6 @@
             </plugin>
 
 
-
         </plugins>
     </build>
     <modules>
@@ -60,6 +59,7 @@
         -->
         <module>myfaces20-example</module>
         <module>myfaces20-extscript-helloworld</module>
+        <module>blog-example</module>
         <!--
         <module>spring-example</module>
         -->