Servlets

The yFiles FLEX server API provides servlet classes that facilitate the most common tasks in a web diagramming application. This section briefly introduces these servlets.

Class LoadGraphServlet

LoadGraphServlet is an abstract servlet class that allows to read a file from an input stream and send it to the client. Subclasses will only have to override the getInputStream method.

Class SaveGraphServlet

SaveGraphServlet is an abstract servlet class that allows to save a graph that was send from the client. SaveGraphServlet uses either a parameter of the request or the request input stream to read the data that is to be saved. Subclasses only have to override the createSaveStream method.

Class DownloadServlet

DownloadServlet is a ready-to-use servlet that can be used for saving a graph on the client. The response is sent using the attachement content type, so that the client application will show a download dialog. DownloadServlet uses either a parameter of the request or the request input stream to read the data that is to be saved on the client.