Package org.apache.wiki.xmlrpc

## Class RPCServlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.apache.wiki.xmlrpc.RPCServlet

All Implemented Interfaces:
  `java.io.Serializable`, `javax.servlet.Servlet`, `javax.servlet.ServletConfig`

    public class RPCServlet
    extends javax.servlet.http.HttpServlet

Handles all incoming servlet requests for XML-RPC calls.

Uses two initialization parameters:

- handler : the class which is used to handle the RPC calls.
- prefix : The command prefix for that particular handler.

Since:
  1.6.6
See Also:
  Serialized Form

### Field Summary

Fields
`static java.lang.String` `XMLRPC_PREFIX` This is what is appended to each command, if the handler has not been specified.

### Constructor Summary

Constructors
`RPCServlet()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `doGet​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Handles HTTP GET.
`void` `doPost​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Handle HTTP POST.
`void` `init​(javax.servlet.ServletConfig config)` Initializes the servlet.
`void` `initHandler​(java.lang.String prefix, java.lang.String handlerName)`

### Methods inherited from class javax.servlet.http.HttpServlet

`doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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`

### Field Detail

#### XMLRPC_PREFIX

    public static final java.lang.String XMLRPC_PREFIX

This is what is appended to each command, if the handler has not been specified.

See Also:
  Constant Field Values

### Constructor Detail

#### RPCServlet

    public RPCServlet()

### Method Detail

#### initHandler

    public void initHandler​(java.lang.String prefix,
                            java.lang.String handlerName)
                     throws java.lang.ClassNotFoundException

Throws:
  `java.lang.ClassNotFoundException`

#### init

    public void init​(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

Initializes the servlet.

Specified by:
  `init` in interface `javax.servlet.Servlet`
Overrides:
  `init` in class `javax.servlet.GenericServlet`
Throws:
  `javax.servlet.ServletException`

#### doPost

    public void doPost​(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException

Handle HTTP POST. This is an XML-RPC call, and we'll just forward the query to an XmlRpcServer.

Overrides:
  `doPost` in class `javax.servlet.http.HttpServlet`
Throws:
  `javax.servlet.ServletException`

#### doGet

    public void doGet​(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException

Handles HTTP GET. However, we do not respond to GET requests, other than to show an explanatory text.

Overrides:
  `doGet` in class `javax.servlet.http.HttpServlet`
Throws:
  `javax.servlet.ServletException`