Hello!
My goal is to serve files using REST classes only (no filesystem should be used), and I am a halfway far from it.
What I am succeeded in, is serving character files (html/css/javascript/etc) using the next approach:
Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.