Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.action.util
Class ResourceLoaderServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.jivesoftware.base.action.util.ResourceLoaderServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ResourceLoaderServlet
extends javax.servlet.http.HttpServlet

Loads resources from the classpath. This servlet should be initialized with a root search path (default is "/resources"). All paths are then requested from that root path.

This servlet should be mapped to a path then the path of the resources are loaded based on the extra path info coming in to the servlet.

Note, any back-referencing paths are explicitly disallowed (ie, /resources/../../foo). Also, only HTTP GET requests are supported.

Multiple resources can be merged together by specifying them as follows:

/resources/merge|/myresource/one.foo|/myresource/two.foo

using pipes to seperate the paths.

Finally, resources can be overridden from the jiveHome directory in a /resources/ directory.

See Also:
Serialized Form

Constructor Summary
ResourceLoaderServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Not implemented, returns @{link HttpServletResponse#SC_METHOD_NOT_ALLOWED}
static java.util.List getFileNames(java.lang.String path, java.lang.String format)
           
static java.util.List getStatusLevelFileNames()
          Returns a list of all the known status level icons in the system
 void init(javax.servlet.ServletConfig config)
          Initializes parameters and starts a task which periodically checks the jiveHome directory for updated resources
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLoaderServlet

public ResourceLoaderServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes parameters and starts a task which periodically checks the jiveHome directory for updated resources

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Not implemented, returns @{link HttpServletResponse#SC_METHOD_NOT_ALLOWED}

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

getFileNames

public static java.util.List getFileNames(java.lang.String path,
                                          java.lang.String format)

getStatusLevelFileNames

public static java.util.List getStatusLevelFileNames()
Returns a list of all the known status level icons in the system

Returns:
a list of all the known status level icons in the system

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.