org.makumba.commons
Class MakumbaResourceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.makumba.commons.MakumbaResourceServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MakumbaResourceServlet
extends HttpServlet

This servlet provides resources needed by makumba, e.g. JavaScript for the date editor KruseCalendarEditor and live validation LiveValidationProvider.

Version:
$Id: MakumbaResourceServlet.java 3693 2009-02-11 00:38:34Z rosso_nero $
Author:
Rudolf Mayer
See Also:
Serialized Form

Field Summary
static SimpleDateFormat dfLastModified
           
static String[] imageContentTypes
           
static int makumbaResources
           
static String RESOURCE_PATH_CSS
           
static String RESOURCE_PATH_IMAGES
           
static String RESOURCE_PATH_JAVASCRIPT
           
 
Constructor Summary
MakumbaResourceServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse resp)
           
static String getContentType(URL url)
           
static boolean isImageType(URL url)
           
static void writeResources(StringBuffer sb, String contextPath, Iterable<Object> resources)
           
static void writeScriptsInHeader(StringBuffer sb, String contextPath, String script)
           
static void writeStylesInHeader(StringBuffer sb, String contextPath, String styleSheet)
           
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_PATH_JAVASCRIPT

public static final String RESOURCE_PATH_JAVASCRIPT
See Also:
Constant Field Values

RESOURCE_PATH_CSS

public static final String RESOURCE_PATH_CSS
See Also:
Constant Field Values

RESOURCE_PATH_IMAGES

public static final String RESOURCE_PATH_IMAGES
See Also:
Constant Field Values

dfLastModified

public static final SimpleDateFormat dfLastModified

makumbaResources

public static int makumbaResources

imageContentTypes

public static final String[] imageContentTypes
Constructor Detail

MakumbaResourceServlet

public MakumbaResourceServlet()
Method Detail

doGet

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

writeResources

public static void writeResources(StringBuffer sb,
                                  String contextPath,
                                  Iterable<Object> resources)

writeStylesInHeader

public static void writeStylesInHeader(StringBuffer sb,
                                       String contextPath,
                                       String styleSheet)

getContentType

public static String getContentType(URL url)

isImageType

public static boolean isImageType(URL url)

writeScriptsInHeader

public static void writeScriptsInHeader(StringBuffer sb,
                                        String contextPath,
                                        String script)