Skip navigation links
com.bea.wlp.rest.servlet
Class RestServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.bea.wlp.rest.servlet.RestServlet
- All Implemented Interfaces
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
-
public class RestServlet
- extends javax.servlet.http.HttpServlet
Servlet class used to service REST requests to a WLP server. This servlet dispatches REST requests to any available installed Command sets, which are installed and configured via wlp-restapi-config.xml
.
This servlet can optionally take an init_param that can be used to configure sub wlp-restapi-config.xml
files if there is a need to modularize them. To use this functionality, add one or more init-params to the REST servlet element in web.xml with names of the form "rest_config_FOO" where FOO can be any unique string. The value of each of these init params should be the filename of the sub rest config file, such as "foo-rest-config.xml". Sub wlp-restapi-config.xml
files may be packaged in jar files in WEB-INF directories as well as being directly placed in WEB-INF directory on the filesystem.
If the namespace functionality for REST commands is in use, the REST servlet should additionally be mapped to that namespace path in web.xml. For instance, if namespace "/my/rest" were definied for any command groups in wlp-restapi-config.xml
, the REST servlet needs to be mapped to "/my/rest/*" in web.xml, as the servlet path is used to route namespaced commands within the servlet.
- See Also
- Serialized Form
Method Summary |
void |
init()
|
protected void |
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_PATH_PREFIX
public static final String CONFIG_PATH_PREFIX
-
- See Also
- Constants Summary
CONFIG_DIR
public static final String CONFIG_DIR
-
- See Also
- Constants Summary
RestServlet
public RestServlet()
init
public void init()
throws javax.servlet.ServletException
-
- Overrides:
init
in class javax.servlet.GenericServlet
-
- Throws
javax.servlet.ServletException
service
protected void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
-
- Overrides:
service
in class javax.servlet.http.HttpServlet
-
- Throws
javax.servlet.ServletException
IOException
Skip navigation links
Copyright © 2010, Oracle. All rights reserved.