public class PreviewServlet
extends javax.servlet.http.HttpServlet
Stores
application for processing.
It will first check to see if any of the request plug-ins can
handle the request. If none of them accept the request then the request
is forwarded on to the Stores
web application.
The list of registered preview request plug-ins will be loaded from the
WEB-INF/wc-preview-plugin.xml
file. This file is associated with the web application
that has registered this servlet. This file will specify any request plug-ins that
will process the preview request before sending the request to the Stores
web application.
The file WEB-INF/wc-preview-plugin.xml
is loaded at initialization. If it cannot be
found then the servlet assumes that there are no plug-ins. In this case, all requests are forwarded
directly to the Stores
web application.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
PATHINFO_NULL
This is a constant that represents a null
pathinfo when forwarding the servlet request. |
static java.lang.String |
PREVIEW_DEFAULT_WEBAPP_NAME
This is the default name of the target web application.
|
static java.lang.String |
PREVIEW_PLUGIN_XML
This is the preview plug-in
XML file. |
static java.lang.String |
PREVIEW_TARGET_WEBAPP_PARAM_NAME
This is the name of the servlet initialization parameter to specify the target web application name.
|
Constructor and Description |
---|
PreviewServlet()
This is the default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
void |
init()
This method performs the common initialization procedures that all web applications
must perform.
|
void |
refresh()
This method reloads the preview request plug-in to add, remove or update the
current preview request plug-ins that are loaded.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String PATHINFO_NULL
pathinfo
when forwarding the servlet request.public static final java.lang.String PREVIEW_PLUGIN_XML
XML
file.public static final java.lang.String PREVIEW_TARGET_WEBAPP_PARAM_NAME
<instance_name>.xml
of the server and
is the web application that all requests will be forwarded to.public static final java.lang.String PREVIEW_DEFAULT_WEBAPP_NAME
Stores
.public PreviewServlet()
public void init() throws javax.servlet.ServletException
WebApp
object but not forcing an initialization. This method also performs
preview initialization. It registers all the request
plug-ins that may want to handle the request instead of being
forwarded to the Stores
web application.
Initialization of the request plug-ins are performed by first reading
the WEB-INF/wc-preview-plugin.xml
file. The each is loaded in the order
determined in the file. This is also the same order in which
they will be called to handle requests.
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
- This is thrown when a problem occurs during initialization.GenericServlet.init()
public void refresh() throws javax.servlet.ServletException
javax.servlet.ServletException
- This is thrown when a problem occurs while refreshing the plug-in list.