|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (8)
View Page Historyh4. Working with {{FileServlet}}
The reply of this servlet is the content of a file:
* the content-type that has been set when creating the servlet,
* the content of the given file when creating the servlet.
* the content of the given file when creating the servlet.
{code}
public static class HasWebServer {
@Rule
@Rule
// ...
final AbstractHttpServlet fileServlet = new FileServlet(
new File(Thread.currentThread().getContextClassLoader().getResource("my-file").toURI()),
final AbstractHttpServlet fileServlet = new FileServlet(localArtifact, MimeTypeConstants.APPLICATION_ZIP);
MimeTypeConstants.APPLICATION_ZIP);
this.webServer.addServlet(servlet, servletPath); this.webServer.addServlet(fileServlet, fileServlet.getPath());
// ...
}
}