<#import "../layout/defaultLayout.ftl.html" as layout> <@layout.myLayout
"Home page">

<header class="jumbotron">
	<h1>Integration Test</h1>
	<p class="lead">This project serves as integration test of Ninja's functionality.
	You should try to test as much as possible with (fast) mocked tests, but from time
	to time you have to test functionality running on a real server. And for those test usecases
	this project is perfect. Feel free to add new testcases to this page.</p>
</header>

<hr>

<h2>Routing</h2>
<ul>
	<li>A default route like this one: <a href="/">/</a></li>
    <li>A route with result: <a href="/route_with_result">/route_with_result</a></li>
	<li>A parameterized route like: <a
		href="/user/12345/john_user/userDashboard">/user/{id}/{name}/userDashboard</a></li>
	<li>A redirect at /redirects back to index... <a href="/redirect">/redirect</a></li>
</ul>

<h2>Restful rendering of Html</h2>
<ul>
    <li>Well.. <a href="/">This page</a> already exemplifies that... right?</li>
</ul>

<h2>Restful rendering of Json</h2>
<ul>
	<li>As seen here GET <a href="/api/person.json">/api/person.json</a></li>
	<li>As seen here POST <a href="/api/person.json">/api/person.json</a> parses the
		body and displays the result.
	</li>
</ul>

<h2>Restful rendering of Xml</h2>
<ul>
    <li>As seen here GET <a href="/api/person.xml">/api/person.xml</a></li>
    <li>As seen here POST <a href="/api/person.xml">/api/person.xml</a> parses the
        body and displays the result.
    </li>
</ul>

<h2>Rendering Form post form directly to object</h2>
<ul>
	<li>As seen here form <a href="/contactForm">/contactForm</a></li>
	
</ul>

<h2>Using Ninja's filters</h2>
<ul>
	<li>A working security filter can be found at: <a href="/filter">/filter</a></li>
	<li>A filter that generates output, changes the status and
		disallows further execution of the filter chain:<a href="/teapot">/teapot</a>
	</li>
</ul>

<h2>Injection via Guice</h2>
<ul>
	<li>Injection of services is important and can be done easily.
		Check out: Not yet completed. <a href="/injection">/injection</a>
	</li>
</ul>

<h2>Ninja's session support</h2>
<ul>
	<li>The default mode of Ninja is to store the session as signed
		cookie on the client side. Check out <a href="/session">/session</a>
	</li>
</ul>

<h2>Ninja's flash cookie support</h2>
<ul>
	<li>To transmit small bits of information from one request to
		another Ninja supports so called flash cookies. They transmit eg a
		error message from one request to another. Usually flash cookies only
		live for one request.
	</li>
	<li>Success message via flash cookie: <a href="/flash_success">/flash_success</a></li>
	<li>Error message via flash cookie: <a href="/flash_error">/flash_error</a></li>
	<li>An arbitrary flash message: <a href="/flash_any">/flash_any</a></li>
</ul>


<h2>Internationalization</h2>
<ul>
	<li>To transmit small bits of information from one request to
		another Ninja supports so called flash cookies. They transmit eg a
		error message from one request to another. Usually flash cookies only
		live for one request: <a href="/i18n">/i18n</a>
	</li>
	<li>You can also get dedicated languages by specifying them via <a href="/i18n/en">/i18n/en</a>,
	       <a href="/i18n/de">/i18n/de</a> and so on...
    </li>
</ul>


<h2>Html Escaping</h2>
<ul>
	<li>By default all html templates are escaped. This eliminates a
		lot of vulnerabilities due to javascript injection attacks. Check out
		the following page and have a look in the source code. The html stuff
		is escaped in the source... <a href="/htmlEscaping">/htmlEscaping</a>
	</li>
</ul>

<h2>Upload files demo:</h2>
<ul>
    <li>Uploading is straight forward using Ninja. Check out the demo at: <a href="/upload">/upload</a>
    </li>
</ul>

</@layout.myLayout>
