adapforms.web.handlers
Class ResourceLoader

java.lang.Object
  extended by adapforms.web.handlers.ResourceLoader

public class ResourceLoader
extends java.lang.Object

Resource load handler: Responsible for outputting static resources to the web client. This includes client-side scripts, images, stylesheets etc.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
ResourceLoader()
           
 
Method Summary
 java.lang.String getMineType(java.lang.String filename)
          Given a filename, return the corresponding MIME type.
 void outputResource(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String resourceName)
          Invoke the handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLoader

public ResourceLoader()
Method Detail

outputResource

public void outputResource(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp,
                           java.lang.String resourceName)
                    throws java.io.IOException
Invoke the handler.

Parameters:
req - HTTP request.
resp - HTTP response
resourceName - Local filename of the resource requested.
Throws:
java.io.IOException - If the resource cannot be found or read.

getMineType

public java.lang.String getMineType(java.lang.String filename)
Given a filename, return the corresponding MIME type. If unknown, null is returned.