Hi Serge, [...]
> When I use StringRepresentation everything works as expected. > When I switch to > TemplateRepresentation the page is rendered, but the browser > keeps loading and > loading. I also noticed that content-length is not set in the > header (whereas > if I use StringRepresentation it's set as well as > charset=ISO-8859-1 in content > type): [...] For the size this is normal, it is not possible to know the size of a dynamic template (like FreeMarker ones) in advance unless you cache the full content which is quickly inefficient. The character set can be changed by using the setCharacterSet() method on your representation instance. Which HTTP server connector are you using? If you are in Restlet 1.0.2, I encourage you to update to 1.0.3 and to configure one of the external connector (Simple, Jetty or AsyncWeb). > If in TemplateRepresentation on line 113 the Writer is > close()'d, it behaves as > expected. The close() method should be closed by the HTTP server connector. But it seems that the internal HTTP server mistakenly exposed in Restlet 1.0.2 doesn't properly close the socket as it should which could explain what you observe. Best regards, Jerome

