|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.servlet.pipeline.PipelineableServletImpl atg.servlet.pipeline.InsertableServletImpl atg.projects.b2bstore.servlet.SetCurrentLocation atg.projects.b2bstore.servlet.WASetCurrentLocation
public class WASetCurrentLocation
A subclass of the SetCurrentLocation servlet that is aware of web applications. Rather than specifying the absolute URL's to map to virtual locations within the store, this subclass lets you specify URL's relative to the web application's context root and converts these to absolute URL's at runtime. It can therefore handle location mapping for a web application no matter where that web application is deployed.
To use this servlet you must specify the following properties:
SetCurrentLocation
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
MY_RESOURCE_NAME
|
Fields inherited from class atg.projects.b2bstore.servlet.SetCurrentLocation |
---|
JHTML_EXTENSION, JSP_EXTENSION, SLASH_EXTENSION |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
WASetCurrentLocation()
|
Method Summary | |
---|---|
protected java.util.Properties |
createLocationMap()
Return a Properties object suitable for use as the value of locationMap by prepending the web application's context
root to each path in relativePathMap . |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey)
Get a formatted error message string based on an error message resource key. |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey,
java.lang.Object pArg)
Get a formatted error message string based on an error message resource key and a single message argument. |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey,
java.lang.Object[] pArgs)
Get a formatted error message string based on an error message resource key and an array of message arguments. |
java.util.Properties |
getRelativePathMap()
Specify the mapping from URL's to virtual locations within the store. |
java.lang.String |
getWebApplicationName()
Return the name by this web applicaiton is known to the web application registry. |
WebAppRegistry |
getWebAppRegistry()
Return the Dynamo Web Application Registry that knows about the web application whose URL's we are mapping to locations. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Examine the current request URL and set the current location property to the corresponding virtual location within the store. |
void |
setRelativePathMap(java.util.Properties pRelativePathMap)
Specify the mapping from URL's to virtual locations within the store, using URL's relative to the web app's context root. |
void |
setWebApplicationName(java.lang.String pWebApplicationName)
Specify the name by this web applicaiton is known to the web application registry. |
void |
setWebAppRegistry(WebAppRegistry pWebAppRegistry)
Specify the Dynamo Web Application Registry that knows about the web application whose URL's we are mapping to locations. |
Methods inherited from class atg.projects.b2bstore.servlet.SetCurrentLocation |
---|
getLocationMap, getLocationProperty, setLocation, setLocationMap, setLocationProperty, setUserLocation, sortLocationMap |
Methods inherited from class atg.servlet.pipeline.InsertableServletImpl |
---|
doStartService, getInsertAfterServlet, setInsertAfterServlet |
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface atg.servlet.pipeline.PipelineableServlet |
---|
getNextServlet, passRequest, setNextServlet |
Methods inherited from interface javax.servlet.Servlet |
---|
destroy, getServletConfig, getServletInfo, init, service |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String MY_RESOURCE_NAME
Constructor Detail |
---|
public WASetCurrentLocation()
Method Detail |
---|
public void setWebAppRegistry(WebAppRegistry pWebAppRegistry)
public WebAppRegistry getWebAppRegistry()
public void setWebApplicationName(java.lang.String pWebApplicationName)
public java.lang.String getWebApplicationName()
public void setRelativePathMap(java.util.Properties pRelativePathMap)
locationMap
in the
base class by prepending the web application's context root to
each URL in relativePathMap
public java.util.Properties getRelativePathMap()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method simply converts the relative location map to an absolute
location map (if necessary) and then calls the superclass service
method to handle the request.
service
in class SetCurrentLocation
java.io.IOException
- if an error occurred while reading or writing
the servlet request
javax.servlet.ServletException
- if an error occurred while processing
the servlet requestprotected java.util.Properties createLocationMap() throws javax.servlet.ServletException
locationMap
by prepending the web application's context
root to each path in relativePathMap
.
javax.servlet.ServletException
protected java.lang.String errorMsg(java.lang.String pResourceKey)
protected java.lang.String errorMsg(java.lang.String pResourceKey, java.lang.Object pArg)
protected java.lang.String errorMsg(java.lang.String pResourceKey, java.lang.Object[] pArgs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |