public class AssetsController extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ASSETS_DIR |
static String |
FILENAME_PATH_PARAM |
Constructor and Description |
---|
AssetsController(HttpCacheToolkit httpCacheToolkit,
MimeTypes mimeTypes,
NinjaProperties ninjaProperties) |
Modifier and Type | Method and Description |
---|---|
static String |
getFileNameFromPathOrReturnRequestPath(Context context) |
String |
normalizePathWithoutTrailingSlash(String fileName)
If we get - for whatever reason - a relative URL like
assets/../conf/application.conf we expand that to the "real" path.
|
Result |
serve(Context context)
Deprecated.
|
Result |
serveStatic(Context context)
Serves resources from the assets directory of your application.
|
Result |
serveWebJars(Context context)
Serves resources from the assets directory of your application.
|
public static final String ASSETS_DIR
public static final String FILENAME_PATH_PARAM
@Inject public AssetsController(HttpCacheToolkit httpCacheToolkit, MimeTypes mimeTypes, NinjaProperties ninjaProperties)
@Deprecated public Result serve(Context context)
public Result serveStatic(Context context)
public Result serveWebJars(Context context)
public String normalizePathWithoutTrailingSlash(String fileName)
fileName
- A potential "fileName"Copyright © 2015 ninjaframework. All Rights Reserved.