PageMixer API - 3.1

jp.ne.dti.lares.foozy.pagemixer.servlet
Class WebAppLocator

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.page.LocalFSLocator
        |
        +--jp.ne.dti.lares.foozy.pagemixer.servlet.WebAppLocator
All Implemented Interfaces:
Locator

public class WebAppLocator
extends LocalFSLocator

Locate resource under the web application.

This gets InputStream of resource from local file system under specified web application.

This bases on ServletContext#getRealPath(String) to locate target resource.

You should use ServletContextLocator if you want to use static resource included in WAR file.

Since:
PageMixer 3.0(as one in this package)
See Also:
ServletContextLocator

Constructor Summary
WebAppLocator(javax.servlet.ServletContext context)
          Create locator to locate resource under specified web application.
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.page.LocalFSLocator
close, getInputStream, getLastModified, isNewerThan, open
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppLocator

public WebAppLocator(javax.servlet.ServletContext context)
Create locator to locate resource under specified web application.

This specifies value gotten ServletContext#getRealPath("") as basePath parameter of LocalFSLocator(String).

Tomcat, Servlet API reference implementation by Jakarta Project, implementation allows ServletContext#getRealPath("") invocation, but another does so ?

Parameters:
context - to locate resource

PageMixer API - 3.1