Class RedirectWebMap

java.lang.Object
org.bzdev.ejws.WebMap
org.bzdev.ejws.maps.RedirectWebMap

public class RedirectWebMap extends WebMap
WebMap for resources that are accessed via an HTTP redirect. The sole argument to the constructor is a URL or URI to which a request URI's path, excluding the prefix, will be appended.
  • Constructor Details

    • RedirectWebMap

      public RedirectWebMap(Object arg)
      Constructor.
      Parameters:
      arg - a URL or a string representation of a URL, the latter mandatory for JAR URLs
  • Method Details

    • allowsQuery

      public boolean allowsQuery()
      Indicate if a URI from an HTTP request can contain a query. for a RedirectWebMap, this is true if the URI is not a JAR URI.
      Overrides:
      allowsQuery in class WebMap
      Returns:
      true if queries are allowed; false otherwise
    • getWebxml

      public WebMap.Info getWebxml()
      Description copied from class: WebMap
      Get the WebMap.Info object for the WEB-INF/web.xml file associated with this instance of WebMap. This method is called when a constructor for FileHandler is executing.
      Overrides:
      getWebxml in class WebMap
      Returns:
      an instance of Info containing an input stream for reading the web.xml file; null if none exists.
    • getWelcomeInfo

      public WebMap.Info getWelcomeInfo() throws IOException
      Description copied from class: WebMap
      Find a "welcome' file. A welcome file is defined in the JSP Web Archive specification, and specifies a default file to use for a web site, so that one is not dependent on server-specific conventions such as naming a 'welcome' file index.html. The method WebMap.addWelcome(String) adds possible welcome file locations.
      Overrides:
      getWelcomeInfo in class WebMap
      Returns:
      an instance of Info containing an input stream for reading the "welcome" file; null if none exists.
      Throws:
      IOException - an IO error occurred
    • getInfoFromPath

      protected WebMap.Info getInfoFromPath(String prepath, String path, String query, String fragment, WebMap.RequestInfo requestInfo)
      Get an Info object for a resource. Only the path component is used.
      Specified by:
      getInfoFromPath in class WebMap
      Parameters:
      prepath - the initial portion of the request URI - the part before the path portion of the URI
      path - the relative path to the resource
      query - the query portion of the request URI
      fragment - the fragment portion of the request URI
      requestInfo - an object encapsulating request data (headers, input streams, etc.)
      Returns:
      an Info object describing properties of a resource and providing an input stream to the resource