java.lang.Object
org.bzdev.ejws.WebMap
org.bzdev.ejws.maps.RedirectWebMap
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bzdev.ejws.WebMap
WebMap.ColorSpec, WebMap.Info, WebMap.RequestInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicate if a URI from an HTTP request can contain a query.protected WebMap.Info
getInfoFromPath
(String prepath, String path, String query, String fragment, WebMap.RequestInfo requestInfo) Get an Info object for a resource.Get the WebMap.Info object for the WEB-INF/web.xml file associated with this instance of WebMap.Find a "welcome' file.Methods inherited from class org.bzdev.ejws.WebMap
acceptsMethod, addErrorEntry, addGzipSuffix, addMapping, addPageEncoding, addPageEncoding, addWelcome, asHeaderOps, configure, deconfigure, getContentTypeFromURL, getDisplayDir, getEmap, getEncodingFromURL, getErrorBackgroundColor, getErrorForegroundColor, getErrorInfo, getErrorInfo, getErrorInfo, getFromHeader, getInfo, getInfo, getInfo, getInfo, getInfo, getInfoFromPath, getMimeType, getSuffixToMimeTypeMap, getWebInfHidden, getWelcomeInfo, getWelcomeList, gzipPaths, newInstance, newInstance, setAllowsQuery, setDisplayDir, setErrorColors, setMethods, setWebInfHidden, stripGZipSuffix, welcomeInfoAvailable
-
Constructor Details
-
RedirectWebMap
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 classWebMap
- Returns:
- true if queries are allowed; false otherwise
-
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 forFileHandler
is executing. -
getWelcomeInfo
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 methodWebMap.addWelcome(String)
adds possible welcome file locations.- Overrides:
getWelcomeInfo
in classWebMap
- 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 classWebMap
- Parameters:
prepath
- the initial portion of the request URI - the part before the path portion of the URIpath
- the relative path to the resourcequery
- the query portion of the request URIfragment
- the fragment portion of the request URIrequestInfo
- 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
-