You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2007/07/22 19:19:58 UTC
svn commit: r558513 - in /tiles/framework/branches/TILES_2_0_X/tiles-test:
./ src/main/webapp/ src/main/webapp/WEB-INF/ src/test/selenium/
Author: apetrelli
Date: Sun Jul 22 10:19:54 2007
New Revision: 558513
URL: http://svn.apache.org/viewvc?view=rev&rev=558513
Log:
TILES-169
Merge from trunk to TILES_2_0_X branch.
Added test case in "tiles-test" webapp to check how FreeMarker integrates with Tiles.
Added:
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl (contents, props changed)
- copied, changed from r558316, tiles/framework/trunk/tiles-test/src/main/webapp/layout.ftl
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp (contents, props changed)
- copied, changed from r558316, tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp
tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html (contents, props changed)
- copied, changed from r558316, tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html
Modified:
tiles/framework/branches/TILES_2_0_X/tiles-test/pom.xml
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/web.xml
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/index.jsp
tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp (contents, props changed)
tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/TestSuite.html
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/pom.xml
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/pom.xml?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/pom.xml (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/pom.xml Sun Jul 22 10:19:54 2007
@@ -66,6 +66,11 @@
<version>1.1.2</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.10</version>
+ </dependency>
</dependencies>
<build>
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml Sun Jul 22 10:19:54 2007
@@ -47,6 +47,12 @@
<put-attribute name="body" value="/body.jsp"/>
</definition>
+ <definition name="test.definition.freemarker" template="/layout.ftl">
+ <put-attribute name="title" value="This is the title."/>
+ <put-attribute name="header" value="/header.jsp"/>
+ <put-attribute name="body" value="/body.jsp"/>
+ </definition>
+
<definition name="test.definition.flush" template="/layout_flush.jsp">
<put-attribute name="title" value="This is the title."/>
<put-attribute name="header" value="/header.jsp"/>
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/web.xml?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/web.xml (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/WEB-INF/web.xml Sun Jul 22 10:19:54 2007
@@ -69,6 +69,40 @@
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>freemarker</servlet-name>
+ <servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class>
+
+ <!-- FreemarkerServlet settings: -->
+ <init-param>
+ <param-name>TemplatePath</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>NoCache</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ContentType</param-name>
+ <param-value>text/html</param-value>
+ </init-param>
+
+ <!-- FreeMarker settings: -->
+ <init-param>
+ <param-name>template_update_delay</param-name>
+ <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
+ </init-param>
+ <init-param>
+ <param-name>default_encoding</param-name>
+ <param-value>ISO-8859-1</param-value>
+ </init-param>
+ <init-param>
+ <param-name>number_format</param-name>
+ <param-value>0.##########</param-value>
+ </init-param>
+
+ <load-on-startup>3</load-on-startup>
+ </servlet>
<servlet>
<servlet-name>Tiles Dispatch Servlet</servlet-name>
@@ -93,6 +127,10 @@
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
+ <servlet-mapping>
+ <servlet-name>freemarker</servlet-name>
+ <url-pattern>*.ftl</url-pattern>
+ </servlet-mapping>
<servlet-mapping>
<servlet-name>layoutServlet</servlet-name>
<url-pattern>/servlets/layoutServlet</url-pattern>
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/index.jsp?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/index.jsp (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/index.jsp Sun Jul 22 10:19:54 2007
@@ -42,6 +42,7 @@
<a href="testinsertdefinition_inline.jsp">Test Insert Configured Definition with an inline content</a><br/>
<a href="testinsertdefinition_composite.jsp">Test Insert Configured Definition that contains another definition inside</a><br/>
<a href="testinsertdefinition_exception.jsp">Test Insert Configured Definition with an exception in an attribute page</a><br/>
+ <a href="testinsertdefinition_freemarker.jsp">Test Insert Configured Definition with FreeMarker</a><br/>
<a href="testput.jsp">Test Put Tag</a><br/>
<a href="testput_flush.jsp">Test Put Tag with Flush</a><br/>
<a href="testput_el.jsp">Test Put Tag using EL</a><br/>
Copied: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl (from r558316, tiles/framework/trunk/tiles-test/src/main/webapp/layout.ftl)
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl?view=diff&rev=558513&p1=tiles/framework/trunk/tiles-test/src/main/webapp/layout.ftl&r1=558316&p2=tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl&r2=558513
==============================================================================
(empty)
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/layout.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp Sun Jul 22 10:19:54 2007
@@ -1,44 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<%--
-/*
- * $Id$
- *
- * 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.
- *
- */
---%>
+<%--
+/*
+ * $Id$
+ *
+ * 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>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Select your locale</title>
</head>
<body>
-<form action="servlets/selectLocaleServlet">
-Select your locale:
-<select name="locale">
-<option selected="selected" value="">Default</option>
-<option value="en_US">American English</option>
-<option value="en_GB">British English</option>
-<option value="fr_FR">French</option>
-<option value="it_IT">Italian</option>
-</select>
-<input type="submit" value="Submit" />
-</form>
+<form action="servlets/selectLocaleServlet">
+Select your locale:
+<select name="locale">
+<option selected="selected" value="">Default</option>
+<option value="en_US">American English</option>
+<option value="en_GB">British English</option>
+<option value="fr_FR">French</option>
+<option value="it_IT">Italian</option>
+</select>
+<input type="submit" value="Submit" />
+</form>
<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
</body>
-</html>
\ No newline at end of file
+</html>
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/selectlocale.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Copied: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp (from r558316, tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp)
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp?view=diff&rev=558513&p1=tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp&r1=558316&p2=tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp&r2=558513
==============================================================================
(empty)
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Copied: tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html (from r558316, tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html)
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html?view=diff&rev=558513&p1=tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html&r1=558316&p2=tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html&r2=558513
==============================================================================
(empty)
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/TestSuite.html
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/TestSuite.html?view=diff&rev=558513&r1=558512&r2=558513
==============================================================================
--- tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/TestSuite.html (original)
+++ tiles/framework/branches/TILES_2_0_X/tiles-test/src/test/selenium/TestSuite.html Sun Jul 22 10:19:54 2007
@@ -37,6 +37,9 @@
<td><a href="ConfiguredDefinitionFlushTest.html">Configured Definition with Flush Test</a></td>
</tr>
<tr>
+ <td><a href="ConfiguredDefinitionFreeMarkerTest.html">Configured Definition with FreeMarker Test</a></td>
+ </tr>
+ <tr>
<td><a href="ConfiguredDefinitionWithPreparerTest.html">Configured Definition with Preparer Test</a></td>
</tr>
<tr>