Refined the example, to clearify the intent
[demos/testing] / src / main / resources / templates / b.html
1 <!DOCTYPE HTML>
2 <html xmlns:th="http://www.thymeleaf.org">
3   <head>
4     <title>Testing Exception-Handling - Template B</title>
5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6   </head>
7   <body>
8     <h1>Template B</h1>
9     <div>
10       <p><strong th:text="'Serving with template ::' + ${template} + '::!'">TEXT</strong></p>
11       <p>
12         Type in <strong><code>a</code></strong> or <strong><code>b</code></strong>
13         for an existing template (no exception). Type in any other string for a
14         non-existent template: Thymeleaf will throw a
15         <strong><code>TemplateInputException</code></strong>!
16       </p>
17     </div>
18     <div>
19       <form action="#" th:action="@{/}" method="get">
20         <div>
21           <label for="path">Remote-Path to fetch:</label>
22           <input type="text" name="template" value="a" th:value="${template}"/>
23         </div>
24         <button type="submit">Submit</button>
25       </form>
26     </div>
27   </body>
28 </html>