public class ApiDocsAssetServlet
extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
ApiDocsAssetServlet(String resourcePath,
String uriPath,
String indexFile,
Charset defaultCharset,
String basePath)
Creates a new
AssetServlet that serves static assets loaded from
resourceURL (typically a file: or jar: URL). |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
String |
getIndexFile() |
URL |
getResourceURL() |
String |
getUriPath() |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic ApiDocsAssetServlet(String resourcePath, String uriPath, String indexFile, Charset defaultCharset, String basePath)
AssetServlet that serves static assets loaded from
resourceURL (typically a file: or jar: URL). The assets are
served at URIs rooted at uriPath. For example, given a
resourceURL of "file:/data/assets" and a uriPath
of "/js", an AssetServlet would serve the contents of /data/assets/example.js in response to a request for
/js/example.js. If a directory is requested and indexFile
is defined, then AssetServlet will attempt to serve a file with
that name in that directory. If a directory is requested and indexFile is null, it will serve a 404.resourcePath - the base URL from which assets are loadeduriPath - the URI path fragment in which all requests are rootedindexFile - the filename to use when directories are requested, or
null to serve no indexesdefaultCharset - the default character setbasePath - the basePath to be used for swagger - if none is given,
then derive basePath from current requestpublic URL getResourceURL()
public String getUriPath()
public String getIndexFile()
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2016 LeanIX GmbH. All rights reserved.