org.exist.http.servlets
Class XQueryServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.exist.http.servlets.XQueryServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XQueryServlet
extends javax.servlet.http.HttpServlet

Servlet to generate HTML output from an XQuery file. The servlet responds to an URL pattern as specified in the WEB-INF/web.xml configuration file of the application. It will interpret the path with which it is called as leading to a valid XQuery file. The XQuery file is loaded, compiled and executed. Any output of the script is sent back to the client. The servlet accepts the following initialization parameters in web.xml:

userThe user identity with which the script is executed.
passwordPassword for the user.
uriA valid XML:DB URI leading to the root collection used to process the request.
encodingThe character encoding used for XQuery files.
container-encodingThe character encoding used by the servlet container.
form-encodingThe character encoding used by parameters posted from HTML forms.
User identity and password may also be specified through the HTTP session attributes "user" and "password". These attributes will overwrite any other settings.

Author:
Wolfgang Meier (wolfgang@exist-db.org)
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_CONTENT_TYPE
           
static java.lang.String DEFAULT_ENCODING
           
static java.lang.String DEFAULT_PASS
           
static XmldbURI DEFAULT_URI
           
static java.lang.String DEFAULT_USER
           
static java.lang.String DRIVER
           
 
Constructor Summary
XQueryServlet()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USER

public static final java.lang.String DEFAULT_USER
See Also:
Constant Field Values

DEFAULT_PASS

public static final java.lang.String DEFAULT_PASS
See Also:
Constant Field Values

DEFAULT_URI

public static final XmldbURI DEFAULT_URI

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

DEFAULT_CONTENT_TYPE

public static final java.lang.String DEFAULT_CONTENT_TYPE
See Also:
Constant Field Values

DRIVER

public static final java.lang.String DRIVER
See Also:
Constant Field Values
Constructor Detail

XQueryServlet

public XQueryServlet()
Method Detail

init

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


Copyright (C) Wolfgang Meier. All rights reserved.