Ocsigen

Eliom examples

Simple pages

A simple page: coucou
A page with a counter: count
A page in a directory: dir/hello
Default page of a directory: rep/

Parameters

A page with GET parameters: coucou with params (what if the first parameter is not an integer?)
A page with "suffix" URL that knows the IP and user-agent of the client: uasuffix
A page with "suffix" URL and GET parameters : isuffix
A page with constants in suffix: Page with constants in suffix
Form towards page with suffix: formsuffix
A page with a parameter of user-defined type : mytype

Links and Forms

A page with links: links
A page with a link towards itself: linkrec
The default page of this directory (myself)
A page with a GET form that leads to the "coucou" page with parameters: form
A POST form towards the "post" page: form2
The "post" page, when it does not receive parameters: post without post_params
A POST form towards a service with GET parameters: form3
A POST form towards an external page: form4

Sessions

Coservices: coservice
A session based on cookies, implemented with session data: sessdata
A session based on cookies, implemented with actions: actions
A session based on cookies, with session services: sessionservices
A session based on cookies, implemented with actions, with session groups: groups
The same with wrong user if not "toto": actions2
Coservices in the session table: calc
Persistent sessions: persist

Other

A page that is very slow, implemented in cooperative way: looong
A page that is very slow, using preemptive threads: looong2
Catching errors: catch (change the value in the URL)
Redirection: redir
Cookies: cookies
Disposable coservices: disposable
Coservice with timeout: timeout
Public coservice created after initialization (with timeout): publiccoduringsess
The following URL send either a statically checked page, or a text page: send_any
A page with a persistent counter: count2
Hierarchical menu
a link sending a <div> page
Non localized parameters
Non localized parameters (absent)
Non localized parameters (present)
CSRF safe services

Advanced forms

A page that parses a parameter using a regular expression: regexpserv.
A form with a checkbox: Try it.
A page that takes a set of parameters: set
A form to the previous one: setform
A page that takes any parameter: raw_serv
A form to the previous one: raw_form
A form for a list of parameters: Try it.