public class WebJarServer extends Object implements Serializable
By default, webJars are enabled for development mode and disabled for
production mode. There is a way to override this behavior by setting
InitParameters.DISABLE_WEBJARS param.
For internal use only. May be renamed or removed in a future release.
| Constructor and Description |
|---|
WebJarServer(DeploymentConfiguration deploymentConfiguration)
Creates a webJar server that is able to search webJars for files and
return them.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getWebJarResourcePath(String filePathInContext)
Gets web jar resource path if it exists.
|
boolean |
tryServeWebJarResource(HttpServletRequest request,
HttpServletResponse response)
Searches for file requested in the webJars.
|
public WebJarServer(DeploymentConfiguration deploymentConfiguration)
deploymentConfiguration - configuration for the deployment, not nullpublic boolean tryServeWebJarResource(HttpServletRequest request,
HttpServletResponse response)
throws IOException
request - the servlet requestresponse - the servlet responsetrue if response was populated with webJar contents,
false otherwiseIOException - if response population failspublic Optional<String> getWebJarResourcePath(String filePathInContext)
filePathInContext - servlet context path for fileCopyright © 2025. All rights reserved.