atg.repository.seo
Class JumpServlet
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.servlet.pipeline.PipelineableServletImpl
atg.servlet.pipeline.InsertableServletImpl
atg.repository.seo.JumpServlet
- All Implemented Interfaces:
- atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, InsertableServlet, PipelineableServlet, java.util.EventListener, javax.servlet.Servlet
public class JumpServlet
- extends InsertableServletImpl
The JumpServlet class supports search engine optimization (SEO).
The ItemLink droplet in the same package as this generates dynamic URLs for
normal users and static URLs for search spiders. The purpose of the JumpServlet is
to handle HTTP requests which have these static URLs as their request URI, since these
do not correspond to actual page content.
This servlet class will perform the following steps:
- It will match the static URL against a predefined set of URL patterns and formats.
- It will then extract parameters that have been embedded as path elements in the static URL.
- The extracted parameter are then inserted as query parameters of a destination URL.
- It then forwards or redirects the request onto the destination URL.
In the case of search spiders, a forward will always be used since it is undesirable for
them to work with dynamic URLs. Redirects usually take place for normal visitors that
have clicked on a static URL in a search results page.
Field Summary |
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
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.GenericService |
addLogListener, doStopService, getAbsoluteName, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 javax.servlet.Servlet |
destroy, getServletConfig, getServletInfo, init, service |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
JumpServlet
public JumpServlet()
getTemplates
public IndirectUrlTemplate[] getTemplates()
- Returns:
- An array of
IndirectUrlTemplate
instances.
setTemplates
public void setTemplates(IndirectUrlTemplate[] pTemplates)
- Parameters:
pTemplates
- The array of IndirectUrlTemplate
instances to set.
getDefaultRepository
public Repository getDefaultRepository()
- Returns:
- The default repository.
setDefaultRepository
public void setDefaultRepository(Repository pDefaultRepository)
- Parameters:
pDefaultRepository
- The default repository to set.
getDefaultWebApp
public WebApp getDefaultWebApp()
- Returns:
- The default
WebApp
that is configured for this jump servlet instance.
setDefaultWebApp
public void setDefaultWebApp(WebApp pDefaultWebApp)
- Parameters:
pDefaultWebApp
- The default WebApp
to set.
isPrependContextPathForRedirect
public boolean isPrependContextPathForRedirect()
- Returns property prependContextPathForRedirect
- Returns:
- prependContextPathForRedirect property
setPrependContextPathForRedirect
public void setPrependContextPathForRedirect(boolean pPrependContextPathForRedirect)
- Sets the prependContextPathForRedirect property
- Parameters:
pPrependContextPathForRedirect
- The property value to set
doStartService
public void doStartService()
throws ServiceException
- Initialises the jump servlet.
- Overrides:
doStartService
in class InsertableServletImpl
- Throws:
ServiceException
- See Also:
GenericService.doStartService()
service
public void service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Main service method of this servlet.
This will match the request URI against a known IndirectUrlTemplate
using its
templates
property
When a match is made, it extracts the parameters from the URL and generates a destination URL using these
parameters as query parameters. It then either forwards or redirects the visitor to the destination URL.
- Overrides:
service
in class PipelineableServletImpl
- Parameters:
pRequest
- The HTTP requestpResponse
- The HTTP response
- Throws:
javax.servlet.ServletException
- Indicates an error
java.io.IOException
- Indicates an error