    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.servlet.JigsawServletContext

    java.lang.Object
       |
       +----org.w3c.tools.resources.event.StructureChangedAdapter
               |
               +----org.w3c.jigsaw.servlet.JigsawServletContext

public class JigsawServletContext
extends StructureChangedAdapter
implements ServletContext, PropertyMonitoring

##

deflogfile
logdir

##

JigsawServletContext(ResourceReference, ObservableProperties)
  Create a new ServletContext.

##

createNewLocalServletLoader(boolean)
getAttribute(String)
  ServletContext implementation - Get an attribute value.
getLocalServletLoader()
  Get or create a suitable LocalServletLoader instance to load that servlet.
getMimeType(String)
  ServletContext implementation - Get the MIME type for given file.
getRealPath(String)
  ServletContext implementation - Translate a piece of path.
getServer()
getServerInfo()
  ServletContext implementation - Get server informations.
getServlet(String)
  ServletContext implementation - Lookup a given servlet.
getServletDirectory()
getServletLogFile()
getServletNames()
  ServletContext implementation - Enumerate all servlets names within context.
getServlets()
  ServletContext implementation - Enumerate all servlets within context.
guessContentTypeFromName(String)
  A useful utility routine that tries to guess the content-type of an object based upon its extension.
log(Exception, String)
log(String)
  ServletContext implementation - Log a message.
propertyChanged(String)
resourceUnloaded(StructureChangedEvent)
  A resource is about to be unloaded This handles the `RESOURCE_UNLOADED` kind of events.

##

logdir

     protected static String logdir

deflogfile

     protected static String deflogfile

##

JigsawServletContext

     protected JigsawServletContext(ResourceReference ref,
                                    ObservableProperties props)

  Create a new ServletContext.

  Parameters:
    ref - a ResourceReference pointing on a ServletDirectoryFrame.

##

propertyChanged

     public boolean propertyChanged(String name)

resourceUnloaded

     public void resourceUnloaded(StructureChangedEvent evt)

  A resource is about to be unloaded This handles the `RESOURCE_UNLOADED` kind of events.

  Overrides:
    resourceUnloaded in class StructureChangedAdapter

guessContentTypeFromName

     protected static String guessContentTypeFromName(String fname)

  A useful utility routine that tries to guess the content-type of an object based upon its extension.

getMimeType

     public String getMimeType(String filename)

  ServletContext implementation - Get the MIME type for given file.

getServer

     public ServerInterface getServer()

getServletLogFile

     public File getServletLogFile()

getServlet

     public Servlet getServlet(String name)

  ServletContext implementation - Lookup a given servlet.

getServlets

     public Enumeration getServlets()

  ServletContext implementation - Enumerate all servlets within context.

getServletNames

     public Enumeration getServletNames()

  ServletContext implementation - Enumerate all servlets names within context.

log

     public void log(String msg)

  ServletContext implementation - Log a message.

log

     public void log(Exception ex,
                     String msg)

getRealPath

     public String getRealPath(String path)

  ServletContext implementation - Translate a piece of path.

getServerInfo

     public String getServerInfo()

  ServletContext implementation - Get server informations.

getAttribute

     public Object getAttribute(String name)

  ServletContext implementation - Get an attribute value. We map this into the ServletWrapper attributes, without support for name clashes though.

  Parameters:
    name - The attribute name.

getLocalServletLoader

     protected synchronized AutoReloadServletLoader getLocalServletLoader()

  Get or create a suitable LocalServletLoader instance to load that servlet.

  Returns:
    A LocalServletLoader instance.

createNewLocalServletLoader

     protected synchronized AutoReloadServletLoader createNewLocalServletLoader(boolean keepold)

getServletDirectory

     public File getServletDirectory()

    All Packages  Class Hierarchy  This Package  Previous  Next  Index