public class PreviewServlet
extends javax.servlet.http.HttpServlet
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.
|
protected void | service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method services the request.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String PATHINFO_NULL
public static final java.lang.String PREVIEW_PLUGIN_XML
public static final java.lang.String PREVIEW_TARGET_WEBAPP_PARAM_NAME
public static final java.lang.String PREVIEW_DEFAULT_WEBAPP_NAME
public PreviewServlet()
public void init() throws javax.servlet.ServletException
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.
public void refresh() throws javax.servlet.ServletException
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException