SolrDispatchFilter (Solr 3.6.2 API)
Keywords: org.apache.solr.servlet.SolrDispatchFilter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.servlet
Class SolrDispatchFilter

    java.lang.Object
      org.apache.solr.servlet.SolrDispatchFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class SolrDispatchFilter

extends Object
implements javax.servlet.Filter

This filter looks at the incoming URL maps them to handlers defined in solrconfig.xml

Since:
  solr 1.2

Field Summary
`protected String` | `abortErrorMessage`
`protected SolrRequestParsers` | `adminRequestParser`
`protected CoreContainer` | `cores`
`protected Map<SolrConfig,SolrRequestParsers>` | `parsers`
`protected String` | `pathPrefix`
`protected String` | `solrConfigFilename`

Constructor Summary
`SolrDispatchFilter()`

Method Summary
`protected CoreContainer.Initializer` | `createInitializer()` Method to override to change how CoreContainer initialization is performed.
`void` | `destroy()`
`void` | `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
`protected void` | `execute(javax.servlet.http.HttpServletRequest req, SolrRequestHandler handler, SolrQueryRequest sreq, SolrQueryResponse rsp)`
`String` | `getPathPrefix()`
`void` | `init(javax.servlet.FilterConfig config)`
`protected void` | `sendError(javax.servlet.http.HttpServletResponse res, Throwable ex)`
`void` | `setPathPrefix(String pathPrefix)` Set the prefix for all paths.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cores

    protected CoreContainer cores

### pathPrefix

    protected String pathPrefix

### abortErrorMessage

    protected String abortErrorMessage

### solrConfigFilename

    protected String solrConfigFilename

### parsers

    protected final Map<SolrConfig,SolrRequestParsers> parsers

### adminRequestParser

    protected final SolrRequestParsers adminRequestParser

Constructor Detail

### SolrDispatchFilter

    public SolrDispatchFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig config)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`

### createInitializer

    protected CoreContainer.Initializer createInitializer()

  Method to override to change how CoreContainer initialization is performed.

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws IOException,
                         javax.servlet.ServletException

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

### execute

    protected void execute(javax.servlet.http.HttpServletRequest req,
                           SolrRequestHandler handler,
                           SolrQueryRequest sreq,
                           SolrQueryResponse rsp)

### sendError

    protected void sendError(javax.servlet.http.HttpServletResponse res,
                             Throwable ex)
                      throws IOException

  Throws:
    `IOException`

### setPathPrefix

    public void setPathPrefix(String pathPrefix)

  Set the prefix for all paths. This is useful if you want to apply the filter to something other then /*, perhaps because you are merging this filter into a larger web application. For example, if web.xml specifies: SolrRequestFilter /xxx/* Make sure to set the PathPrefix to "/xxx" either with this function or in web.xml. path-prefix /xxx

### getPathPrefix

    public String getPathPrefix()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD