#import "../layout/defaultLayout.ftl.html" as layout> <@layout.myLayout
"Home page">
Standard behavior
... and some code in the future ;)
Rendering jsons
- As seen here GET /person
- As seen here POST /person parses the
body and displays the result.
Filtering
- A working security filter can be found at: /filter
- A filter that generates output, changes the status and
disallows further execution of the filter chain:/teapot
Injection
- Injection of services is important and can be done easily.
Check out: Not yet completed. /injection
Session support
- The default mode of Ninja is to store the session as signed
cookie on the client side. Check out /session
Flash cookie support
- 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: /TODO
Internationalization
- 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: /i18n
Html Escaping
- 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... /htmlEscaping
Upload demo:
- Uploading is straight forward using Ninja. Check out the demo at: /upload
@layout.myLayout>