org.mule.transport.servlet
Class JarResourceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mule.transport.servlet.JarResourceServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class JarResourceServlet
extends HttpServlet

A servlet for loading resources loaded in jar files. This allows javascript, html and images to be bundled into a jar This servlet also supports property placeholders for html, xml and json files. This allows for server configuration to be injected into static files.

See Also:
Serialized Form

Field Summary
static String DEFAULT_BASE_PATH
           
static String DEFAULT_MIME_TYPE
           
static String DEFAULT_PATH_SPEC
           
 
Constructor Summary
JarResourceServlet()
           
 
Method Summary
protected  String determineMimeType(String file)
           
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  byte[] expandTemplates(byte[] buffer, String mimetype)
           
 String getBasepath()
           
protected  String getFile(HttpServletRequest request)
           
 void init()
           
 void setBasepath(String basepath)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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
 

Field Detail

DEFAULT_PATH_SPEC

public static final String DEFAULT_PATH_SPEC
See Also:
Constant Field Values

DEFAULT_BASE_PATH

public static final String DEFAULT_BASE_PATH
See Also:
Constant Field Values

DEFAULT_MIME_TYPE

public static final String DEFAULT_MIME_TYPE
See Also:
Constant Field Values
Constructor Detail

JarResourceServlet

public JarResourceServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

getFile

protected String getFile(HttpServletRequest request)

determineMimeType

protected String determineMimeType(String file)

expandTemplates

protected byte[] expandTemplates(byte[] buffer,
                                 String mimetype)

getBasepath

public String getBasepath()

setBasepath

public void setBasepath(String basepath)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.