public class StaticResource
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
protected String |
alias
The base URL for these static resources
|
protected ClassLoader |
classloader
The classloader to use to search for the static resources.
|
protected String |
classpath
The classpath to search for the static resources
|
protected String |
welcomeFile
The welcome file to redirect to, if only the alias is specified in the request
|
| Constructor and Description |
|---|
StaticResource(ClassLoader classloader,
String classpath,
String alias,
String welcomeFile)
Constructs a static resources.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Map componentProperties)
Activates the static resource when it is instantiated using Declarative Services.
|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
String |
getDefaultUrl() |
String |
toString() |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprotected String classpath
protected String alias
protected String welcomeFile
protected ClassLoader classloader
public StaticResource(ClassLoader classloader, String classpath, String alias, String welcomeFile)
classpath - the classpath to the static resourcesalias - the URL aliaswelcomeFile - the default welcome filepublic void activate(Map componentProperties)
componentProperties - the DS component contextpublic String getDefaultUrl()
public 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 © 2009–2021 Opencast Project. All rights reserved.