Return a html resource to VaadinResponse in RequestHandler


I’m trying to return a html resource using the RequestHandler for display in a popup window. How do I go about this?
I’m using an external javascript library which does a HTTP POST to access a particular static html resource which I placed inside /VAADIN/resources/theFile.html.

In the handleRequest code of my custom RequestHandler, I have
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
if (request.getPathInfo().equals(“/popup/resources/theFile.html”)){
// What do I add in here?
// response.setContentType(“text/html”);
return true;
return false;

Never mind, figured it out.
Use a FileResource to get the inputstream and pass it to the response outputstream.