org.exist.http.servlets
Class XQueryServlet
java.lang.Object
HttpServlet
org.exist.http.servlets.XQueryServlet
- public class XQueryServlet
- extends 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:
| user | The user identity with which the script is executed. |
| password | Password for the user. |
| uri | A valid XML:DB URI leading to the root collection used to
process the request. |
| encoding | The character encoding used for XQuery files. |
| container-encoding | The character encoding used by the servlet
container. |
| form-encoding | The 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
|
Method Summary |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
|
void |
init(ServletConfig config)
|
protected void |
process(HttpServletRequest request,
HttpServletResponse response)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 java.lang.String DEFAULT_URI
- See Also:
- Constant Field Values
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
XQueryServlet
public XQueryServlet()
init
public void init(ServletConfig config)
throws ServletException
- Throws:
ServletException
doGet
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
doPost
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
process
protected void process(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
<oXygen/>
XML Editor
provides support for editing and debugging XQuery
expressions against the eXist XML Database.