public class HttpQueryServer extends Object
The main method of this class starts a very basic HTTP server answering queries. If a matching document collection is provided, the server will also display some intervals satisfying the queries.
Queries are served by the
default, the servlet listen on port 4242, and the servlet is deployed under
the path /Query. A servlet displaying single documents from the collection
is deployed under the path /Item. The server and the servlet are fully multithreaded.
If you want to start this server from the command line, you must use the
main method of
Query, providing the suitable option.
Changes to the
QueryEngine made through the text interface will
be reflected in the web interface, making it possible to experiment with different
|Modifier and Type||Field and Description|
The underlying Jetty server.
|Constructor and Description|
Creates a new HTTP query server.
|Modifier and Type||Method and Description|
Sets the given extended properties so that velocity finds its files either by classpath, or by absolute filename, or by relative filename.
public final org.mortbay.jetty.Server server
public HttpQueryServer(QueryEngine queryEngine, DocumentCollection collection, Class<? extends HttpServlet> itemClass, String itemMimeType, int port, BigList<? extends CharSequence> titleList) throws Exception
queryEngine- the query engine that will be used (actually, copied) by the servlets run by this query server.
collection- the document collection (related to the indices contained in
queryEngine) that will be used to display documents.
itemClass- a class implementing an
HttpServletand responsible for displaying documents (see, e.g.,
itemMimeType- the default MIME type of a displayed item.
port- the port exposing the server.
titleList- an optional list of titles for all documents, or
public static org.apache.commons.collections.ExtendedProperties setLiberalResourceLoading(org.apache.commons.collections.ExtendedProperties p)
p- the extended properties of the servlet, obtained via super.loadConfiguration().
pthe additional items setting a liberal scheme for resource loading.