Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae def593738 -> 19c2b9873


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/classes/example/ControllerServlet.java
----------------------------------------------------------------------
diff --git 
a/src/examples/webapp2/WEB-INF/classes/example/ControllerServlet.java 
b/src/examples/webapp2/WEB-INF/classes/example/ControllerServlet.java
deleted file mode 100644
index 528270b..0000000
--- a/src/examples/webapp2/WEB-INF/classes/example/ControllerServlet.java
+++ /dev/null
@@ -1,148 +0,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.
- */
-
-package example;
-
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import freemarker.template.*;
-import freemarker.ext.beans.BeansWrapper;
-
-
-/**
- * <p>This is very very primitive MVC Controller servlet base class, based
- * on example 1. The application specific controller servlet should extend
- * this class.
- */
-public class ControllerServlet extends HttpServlet {
-
-    // Volatile so that it's properly published according to JSR 133 (JMM).
-    // Although, the servlet container most certainly makes this unnecessarry.
-    private volatile Configuration cfg; 
-    
-    public void init() {
-        // Initialize the FreeMarker configuration;
-        // - Create a configuration instance, with the 
not-100%-backward-compatible
-        //   fixes up until FreeMarker 2.3.21 applied (as far as it starts
-        //   with 2.3, these are only minor changes that doesn't affect most 
apps):
-        Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
-        // - Templates are stoted in the WEB-INF/templates directory of the 
Web app.
-        cfg.setServletContextForTemplateLoading(
-                getServletContext(), "WEB-INF/templates");
-        // - At most how often should FreeMarker check if a template was 
updated:
-        cfg.setTemplateUpdateDelay(isInDevelopmentMode() ? 0 : 60);
-        // - When developing, set an error handler that prints errors so they 
are
-        //   readable with a Web browser, otherwise we just let the HTTP 500
-        //   handler deal with it.
-        cfg.setTemplateExceptionHandler(
-                isInDevelopmentMode()
-                        ? TemplateExceptionHandler.HTML_DEBUG_HANDLER
-                        : TemplateExceptionHandler.RETHROW_HANDLER);
-        // - Set the default charset of the template files
-        cfg.setDefaultEncoding("ISO-8859-1");
-        // - Set the charset of the output. This is actually just a hint, that
-        //   templates may require for URL encoding and for generating META
-        //   element that uses http-equiv="Content-type".
-        cfg.setOutputEncoding("UTF-8");
-        // - Set the default locale
-        cfg.setLocale(Locale.US);
-        
-        // Finished modifying cfg, so let's publish it to other threads:
-        this.cfg = cfg;
-    }
-    
-    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
-            throws ServletException, IOException {
-        doGet(req, resp);
-    }
-    
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
-        throws ServletException, IOException {
-        
-        // Choose action method
-        String action = req.getServletPath();
-        if (action == null) action = "index";
-        if (action.startsWith("/")) action = action.substring(1);
-        if (action.lastIndexOf(".") != -1) {
-            action = action.substring(0, action.lastIndexOf("."));
-        }
-        Method actionMethod;
-        try {
-            actionMethod =
-                    getClass().getMethod(action + "Action",
-                    new Class[]{HttpServletRequest.class, Page.class});
-        } catch (NoSuchMethodException e) {
-            throw new ServletException("Unknown action: " + action);
-        }
-        
-        // Set the request charset to the same as the output charset,
-        // because HTML forms normally send parameters encoded with that.
-        req.setCharacterEncoding(cfg.getOutputEncoding());
-        
-        // Call the action method
-        Page page = new Page();
-        try {
-            actionMethod.invoke(this, new Object[]{req, page});
-        } catch (IllegalAccessException e) {
-            throw new ServletException(e);
-        } catch (InvocationTargetException e) {
-            throw new ServletException(e.getTargetException());
-        }
-        
-        if (page.getTemplate() != null) { // show a page with a template
-            // Get the template object
-            Template t = cfg.getTemplate(page.getTemplate());
-            
-            // Prepare the HTTP response:
-            // - Set the MIME-type and the charset of the output.
-            //   Note that the charset should be in sync with the 
output_encoding setting.
-            resp.setContentType("text/html; charset=" + 
cfg.getOutputEncoding());
-            // - Prevent browser or proxy caching the page.
-            //   Note that you should use it only for development and for 
interactive
-            //   pages, as it significantly slows down the Web site.
-            resp.setHeader("Cache-Control", "no-store, no-cache, 
must-revalidate, "
-                    + "post-check=0, pre-check=0");
-            resp.setHeader("Pragma", "no-cache");
-            resp.setHeader("Expires", "Thu, 01 Dec 1994 00:00:00 GMT");
-            Writer out = resp.getWriter();
-            
-            // Merge the data-model and the template
-            try {
-                t.process(page.getRoot(), out);
-            } catch (TemplateException e) {
-                throw new ServletException(
-                        "Error while processing FreeMarker template", e);
-            }
-        } else if (page.getForward() != null) { // forward request
-            RequestDispatcher rd = req.getRequestDispatcher(page.getForward());
-            rd.forward(req, resp);            
-        } else {
-            throw new ServletException("The action didn't specified a 
command.");
-        }
-    }
-    
-    private boolean isInDevelopmentMode() {
-        // FIXME: Should detect this with a system property for example.
-        return true;
-    }
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/classes/example/GuestbookEntry.java
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/classes/example/GuestbookEntry.java 
b/src/examples/webapp2/WEB-INF/classes/example/GuestbookEntry.java
deleted file mode 100644
index 7e9f6f7..0000000
--- a/src/examples/webapp2/WEB-INF/classes/example/GuestbookEntry.java
+++ /dev/null
@@ -1,45 +0,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.
- */
-
-package example;
-
-public class GuestbookEntry {
-    private String name;
-    private String email;
-    private String message;
-    
-    public GuestbookEntry(String name, String email, String message) {
-        this.name = name;
-        this.email = email;
-        this.message = message;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/classes/example/GuestbookServlet.java
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/classes/example/GuestbookServlet.java 
b/src/examples/webapp2/WEB-INF/classes/example/GuestbookServlet.java
deleted file mode 100644
index fb0ddce..0000000
--- a/src/examples/webapp2/WEB-INF/classes/example/GuestbookServlet.java
+++ /dev/null
@@ -1,97 +0,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.
- */
-
-package example;
-
-import java.io.IOException;
-import java.util.*;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.*;
-
-public class GuestbookServlet extends ControllerServlet {
-    /**
-     * Stores the list of guestbook entries.
-     * 
-     * <p>Note that for the sake of simplicity, this example
-     * does not try to store the guestbook persistenty.
-     */
-    private ArrayList guestbook = new ArrayList();
-    
-    public void indexAction(HttpServletRequest req, Page p) {
-        List snapShot;
-        synchronized (guestbook) {
-            snapShot = (List) guestbook.clone();
-        }
-        p.put("guestbook", snapShot);
-        p.setTemplate("index.ftl");
-    }
-
-    public void formAction (HttpServletRequest req, Page p)
-            throws IOException, ServletException {
-                
-        p.put("name", noNull(req.getParameter("name")));
-        p.put("email", noNull(req.getParameter("email")));
-        p.put("message", noNull(req.getParameter("message")));
-        List errors = (List) req.getAttribute("errors");
-        p.put("errors", errors == null ? new ArrayList() : errors);
-
-        p.setTemplate("form.ftl");
-    }
-
-    public void addAction (HttpServletRequest req, Page p)
-            throws IOException, ServletException {
-        List errors = new ArrayList();
-        String name = req.getParameter("name");
-        String email = req.getParameter("email");
-        String message = req.getParameter("message");
-        if (isBlank(name)) {
-            errors.add("You must give your name.");
-        }
-        if (isBlank(message)) {
-            errors.add("You must give a message.");
-        }
-
-        // Was the sent data was correct?
-        if (errors.isEmpty()) {
-            if (email == null) email = "";
-            // Create and insert the new guestbook entry.
-            GuestbookEntry e = new GuestbookEntry(
-                    name.trim(), email.trim(), message);
-            synchronized (guestbook) {
-                guestbook.add(0, e);
-            }
-            // Show "Entry added" page.
-            p.put("entry", e);
-            p.setTemplate("add.ftl");
-        } else {
-            // Go back to the page of the form
-            req.setAttribute("errors", errors);
-            p.setForward("form.a");
-        }
-    }
-
-    public static String noNull(String s) {
-        return s == null ? "" : s;
-    }
-    
-    public static boolean isBlank(String s) {
-        return s == null || s.trim().length() == 0; 
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/classes/example/Page.java
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/classes/example/Page.java 
b/src/examples/webapp2/WEB-INF/classes/example/Page.java
deleted file mode 100644
index fb3ac62..0000000
--- a/src/examples/webapp2/WEB-INF/classes/example/Page.java
+++ /dev/null
@@ -1,67 +0,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.
- */
-
-package example;
-
-import java.util.*;
-
-public class Page {
-    private String template;
-    private String forward;
-    private Map root = new HashMap();
-
-    public String getTemplate() {
-        return template;
-    }
-    
-    public void setTemplate(String template) {
-        forward = null;
-        this.template = template;
-    }
-
-    public void put(String name, Object value) {
-        root.put(name, value);
-    }
-    
-    public void put(String name, int value) {
-        root.put(name, Integer.valueOf(value));
-    }
-    
-    public void put(String name, double value) {
-        root.put(name, Double.valueOf(value));
-    }
-
-    public void put(String name, boolean value) {
-        root.put(name, Boolean.valueOf(value));
-    }
-    
-    public Map getRoot() {
-        return root;
-    }
-    
-    public String getForward() {
-        return forward;
-    }
-
-    public void setForward(String forward) {
-        template = null;
-        this.forward = forward;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/templates/add.ftl
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/templates/add.ftl 
b/src/examples/webapp2/WEB-INF/templates/add.ftl
deleted file mode 100644
index 58777b6..0000000
--- a/src/examples/webapp2/WEB-INF/templates/add.ftl
+++ /dev/null
@@ -1,32 +0,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.
--->
-<#import "/lib/common.ftl" as com>
-<#escape x as x?html>
-
-<@com.page title="Entry added">
-  <p>You have added the following entry to the guestbook:
-  <p><b>Name:</b> ${entry.name}
-  <#if entry.email?length != 0>
-    <p><b>Email:</b> ${entry.email}
-  </#if>
-  <p><b>Message:</b> ${entry.message}
-  <p><a href="index.a">Back to the index page...</a>
-</@com.page>
-
-</#escape>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/templates/form.ftl
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/templates/form.ftl 
b/src/examples/webapp2/WEB-INF/templates/form.ftl
deleted file mode 100644
index 69b9b66..0000000
--- a/src/examples/webapp2/WEB-INF/templates/form.ftl
+++ /dev/null
@@ -1,44 +0,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.
--->
-<#import "/lib/common.ftl" as com>
-<#escape x as x?html>
-
-<@com.page title="Add Entry">
-  <#if errors?size != 0>
-    <p><font color=red>Please correct the following problems:</font>
-    <ul>
-      <#list errors as e>
-        <li><font color=red>${e}</font>
-      </#list>
-    </ul>
-  </#if>
-  
-  <form method="POST" action="add.a">
-    <p>Your name:<br>
-    <input type="text" name="name" value="${name}" size=60>
-    <p>Your e-mail (optional):<br>
-    <input type="text" name="email" value="${email}" size=60>
-    <p>Message:<br>
-    <textarea name="message" wrap="soft" rows=3 cols=60>${message}</textarea>
-    <p><input type="submit" value="Submit">
-  </form>
-  <p><a href="index.a">Back to the index page</a>
-</@com.page>
-
-</#escape>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/templates/index.ftl
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/templates/index.ftl 
b/src/examples/webapp2/WEB-INF/templates/index.ftl
deleted file mode 100644
index 92ae90d..0000000
--- a/src/examples/webapp2/WEB-INF/templates/index.ftl
+++ /dev/null
@@ -1,42 +0,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.
--->
-<#import "/lib/common.ftl" as com>
-<#escape x as x?html>
-
-<@com.page title="Index">
-  <a href="form.a">Add new message</a> | <a href="help.html">How this 
works?</a>
-  
-  <#if guestbook?size = 0>
-    <p>No messages.
-  <#else>
-    <p>The messages are:
-    <table border=0 cellspacing=2 cellpadding=2 width="100%">
-      <tr align=center valign=top>
-        <th bgcolor="#C0C0C0">Name
-        <th bgcolor="#C0C0C0">Message
-      <#list guestbook as e>
-        <tr align=left valign=top>
-          <td bgcolor="#E0E0E0">${e.name} <#if e.email?length != 0> (<a 
href="mailto:${e.email}";>${e.email}</a>)</#if>
-          <td bgcolor="#E0E0E0">${e.message}
-      </#list>
-    </table>
-  </#if>
-</@com.page>
-
-</#escape>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/templates/lib/common.ftl
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/templates/lib/common.ftl 
b/src/examples/webapp2/WEB-INF/templates/lib/common.ftl
deleted file mode 100644
index c6c43ae..0000000
--- a/src/examples/webapp2/WEB-INF/templates/lib/common.ftl
+++ /dev/null
@@ -1,39 +0,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.
--->
-<#macro page title>
-  <html>
-  <head>
-    <title>FreeMarker Example Web Application 2 - ${title?html}</title>
-    <meta http-equiv="Content-type" content="text/html; 
charset=${.output_encoding}">
-  </head>
-  <body>
-    <h1>${title?html}</h1>
-    <hr>
-    <#nested>
-    <hr>
-    <table border="0" cellspacing=0 cellpadding=0 width="100%">
-      <tr valign="middle">
-        <td align="left">
-          <i>FreeMarker Example 2</i>
-        <td align="right">
-          <a href="http://freemarker.org";><img src="poweredby_ffffff.png" 
border=0></a>
-    </table>
-  </body>
-  </html>
-</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/WEB-INF/web.xml 
b/src/examples/webapp2/WEB-INF/web.xml
deleted file mode 100644
index 91e8f3e..0000000
--- a/src/examples/webapp2/WEB-INF/web.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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.
--->
-
-<!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>
-  <display-name>FreeMarker Example Web Application 2</display-name>
-  <servlet>
-    <servlet-name>guestbook</servlet-name>
-    <servlet-class>example.GuestbookServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>guestbook</servlet-name>
-    <url-pattern>*.a</url-pattern>
-  </servlet-mapping>
-  <welcome-file-list>
-      <welcome-file>help.html</welcome-file>
-  </welcome-file-list>
-</web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/help.html
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/help.html b/src/examples/webapp2/help.html
deleted file mode 100644
index c8d8fed..0000000
--- a/src/examples/webapp2/help.html
+++ /dev/null
@@ -1,84 +0,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.
--->
-<html>
-<head>
-  <title>FreeMarker Example Web Application 2 - Help</title>
-  <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-
-<h1>FreeMarker Example Web Application 2</h1>
-
-<p>To try this example you should visit
-<a 
href="index.a"><code>http://<i>yourServer</i>/<i>thisWebApp</i>/index.a</code></a>
-
-<p><b>Note:</b> To simplify the example, the guest-book entries are not stored
-persistently. If you reload the servlet all guest-book entry will lose.
-
-
-<h2>What's this example about?</h2>
-
-<p>This is a very primitive controller servlet class (was written based on 
FreeMarker Example Web Application 1)
-and a simple guest-book appliction that uses the conroller servlet class. This 
whole stuff is a very
-primitive thing. It is only to get you started if you plan to develop some 
custom "framework" for your
-Web applications, rather than using an already written framework.
-Note that a Web application framework can use very different approach than this
-example.
-
-
-<h2>How this example works?</h2>
-
-<p>This example uses a primitive controller servlet, 
<code>example.ControllerServlet</code>.
-To add application specific behavior, you should extend this servlet
-with an application specific subclass, that adds the so-called action
-methods. Here we implement a primitive guest book application by
-extending <code>ControllerServlet</code> with <code>GuestbookServlet</code>, 
that adds 3
-action methods:
-<ul>
-  <li><code>indexAction</code>: Shows the whole guest-book.
-  <li><code>formAction</code>: Show the from where you enter a guest-book 
entry.
-  <li><code>addAction</code>: Adds a new guest-book entry.
-</ul>
-
-<p>The <code>ControllerServlet</code> calls the action methods when it 
receives client requests.
-It deduces the name of the action methods to call
-from the request URL. The servlet will be invoked only if the request URL is
-ending with ".a", as you can see in the <code>WEB-INF/web.xml</code>, 
otherwise a static file
-(for example this html file, or an image file) will be returned as is.
-To deduce the method name, the servlet removes the <code>.a</code> and the 
Web-application directory
-from the request URL, and then appends <code>"Action"</code>. Thus, if you type
-<code>http://<i>yourServler</i>/<i>thisWebApp</i>/foo.a</code>, then it will 
try to
-call the <code>fooAction</code> method.
-
-<p>Each action method gets two parameters: the 
<code>HttpServletRequest</code>, and
-the <code>Page</code> object. The <code>Page</code> object plays the role of
-<code>HttpServletResponse</code>, but instead of calling low lever methods,
-you add objects to the data model with <code>put(<i>name</i>, 
<i>value</i>)</code>, and
-choose the template (the view) with 
<code>setTemplate(<i>templateName</i>)</code>; the
-tedious dirty work is done by <code>ControllerServlet</code>.
-
-<p>The templates are stored in the <code>WEB-INF/templates</code> directory.
-
-<p>For more details read the source code.
-
-<hr>
-<p><a href="index.a">Back to the index page</a>
-  
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/19c2b987/src/examples/webapp2/poweredby_ffffff.png
----------------------------------------------------------------------
diff --git a/src/examples/webapp2/poweredby_ffffff.png 
b/src/examples/webapp2/poweredby_ffffff.png
deleted file mode 100644
index 22b3a80..0000000
Binary files a/src/examples/webapp2/poweredby_ffffff.png and /dev/null differ

Reply via email to