public class IlvResourceController extends javax.servlet.http.HttpServlet implements IlvFacesConstants
The resource controller servlet is in charge of loading resources
(.gif, .jpg, .js, .jpeg,.css,.png) from the client.
The resource description is given as a set of request parameters
that will be interpreted by the service
method of this
servlet.
res=$res$
to get resources inside the jarres=/
to get resources under web application contextThe JavaScript bundles served by this class are zipped by default. To disable the zipping of these bundles, add this section to your web deployment descriptor (usually web.xml):
<web-app> ... <context-param> <param-name>ilog.views.faces.GZIP_SCRIPT_BUNDLES</param-name> <param-value>false</param-value> </context-param> ... </web-app>
AFTER_HANDLER, BASETEXTDIRECTION, BEFORE_HANDLER, BUTTON_GROUP_ID, BUTTON_TYPE, CHARTS_BUNDLE, CHARTS_MESSAGE_BUNDLE, CORE_BUNDLE, CORE_MESSAGE_BUNDLE, CURSOR, DATA, DECODED_PROPERTY, DEFAULT_LINE_COLOR, DELETION_ALLOWED, DIAGRAMMER_BUNDLE, DIAGRAMMER_MESSAGE_BUNDLE, ENABLED, EVENT_TYPE, FILL_ON, FORCE_UPDATE_PROPERTIES, FRAMEWORK_BUNDLE, FRAMEWORK_MESSAGE_BUNDLE, GANTT_BUNDLE, GANTT_MESSAGE_BUNDLE, HEIGHT, IMAGE, IMAGE_MODE, INFO_PROVIDER_MB, INT_NOT_DEFINED, INTERACTORS, INTERCEPT_INTERACTOR, ITEM_DISABLED_STYLE_CLASS, ITEM_HIGHLIGHTED_STYLE_CLASS, ITEM_STYLE_CLASS, LINE_COLOR, LINE_WIDTH, MAPS_BUNDLE, MAPS_MESSAGE_BUNDLE, MENU_MODEL_ID, MESSAGE, MESSAGE_BOX, MESSAGE_BOX_ID, MOVE_ALLOWED, OBJECT_FINDER, PARAM_COMPID, PARAM_DATA, PARAM_KEY, PARAM_NAMESPACE, PARAM_RESOURCE, PARAM_SERVICE, PARAM_TYPE, POPUP_MENU, POPUP_MENU_FACTORY, POPUP_MENU_FACTORY_CLASS, PORTLET_NAMESPACE, PROGRESSIVE_ZOOM, PROJECT, RENDER, RESOURCES_PATH, RESOURCES_PATH_PREFIX, ROLLOVER_IMAGE, SCROLL_BAR, SELECTED, SELECTED_IMAGE, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVLET, SERVLET_CLASS, SERVLET_URL, STYLE, STYLE_CLASS, TGO_BUNDLE, TGO_MESSAGE_BUNDLE, TITLE, TOGGLE, VALUE, VIEW, VIEW_ID, WIDTH
Constructor and Description |
---|
IlvResourceController()
Creates a new
IlvResourceController instance. |
Modifier and Type | Method and Description |
---|---|
static InputStream |
getResourceAsStream(javax.servlet.ServletContext context,
String resName)
Gets a system resource in a stream.
|
static InputStream |
getResourceAsStream(String resName)
Gets a system resource in a stream.
|
InputStream |
getResourceFromAbsolutePath(String path)
Gets a resource from the absolute file path.
|
void |
init(javax.servlet.ServletConfig config) |
static String |
makeContextPathURL(String servletPath,
String path) |
static String |
makeURLFromResource(String servletPath,
String resName) |
static String |
makeURLFromResource(String servletPath,
String resName,
String mimeType) |
static String |
makeURLFromResource(String contextPath,
String resourceManagerPath,
String resName,
String mimeType) |
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles the resource request.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public IlvResourceController()
IlvResourceController
instance.public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public InputStream getResourceFromAbsolutePath(String path) throws FileNotFoundException
path
- Absolute file path.InputStream
containing the content of the given file.FileNotFoundException
- If resource can not be found.public static InputStream getResourceAsStream(String resName)
resName
- The resource name.MissingResourceException
- if the resource could
not be read.public static InputStream getResourceAsStream(javax.servlet.ServletContext context, String resName)
MissingResourceException
- if the resource could
not be read.public static String makeURLFromResource(String servletPath, String resName, String mimeType)
servletPath
- The path of the resource servlet.resName
- The name of the resource.mimeType
- The MIME type of the resource.public static String makeURLFromResource(String servletPath, String resName)
servletPath
- The path of the resource servlet.resName
- The identifier of the bundle.public static String makeContextPathURL(String servletPath, String path)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.