|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--edu.ucsb.adl.middleware.QueryServlet
HTTP interface to the ADL query service. The query service can be
accessed by an HTTP GET or POST request containing one URL-encoded
parameter: query, the query to submit. The content
type of the return is text/plain with
platform-specific encoding, and consists of the query ID followed
by a newline.
Service exceptions are caught and returned as HTTP errors. In
particular, BadRequestException is mapped to 400 (bad
request), NoAuthorizationException is mapped to 403
(forbidden), UnsupportedException is mapped to 501
(not implemented), and InternalErrorException is
mapped to 500 (internal server error).
$Log: QueryServlet.java,v $
Revision 1.4 2004/03/02 22:01:48 gjanee
If the middleware_configuration_file servlet
initialization parameter is not available, we now look for it as a
context-wide initialization parameter.
Revision 1.3 2001/10/04 18:21:31 gjanee
To support the middleware being a web application, we now allow the
location of the middleware configuration file to be specified
relative to the web application directory.
Revision 1.2 2001/02/15 18:36:46 gjanee
Minor upgrade to servlet API 2.2.
Revision 1.1 2000/04/20 19:44:31 gjanee
Initial revision
| Constructor Summary | |
QueryServlet()
Creates a QueryServlet. |
|
| Method Summary | |
void |
destroy()
Frees all resources held by the servlet. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP GET interface to the ADL query service. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP POST interface to the ADL query service. |
void |
init(javax.servlet.ServletConfig config)
Initializes the servlet. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
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 |
| Constructor Detail |
public QueryServlet()
QueryServlet.
| Method Detail |
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig - Must contain the following initialization parameter:
middleware_configuration_file, the filename of the
ADL middleware configuration file. If the filename is not
absolute, it is interpreted relative to the middleware web
application directory.
javax.servlet.UnavailableException - If the initialization fails.
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
doGet in class javax.servlet.http.HttpServletrequest - The HTTP request.response - The HTTP response.
java.io.IOException - On any I/O error.
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
doPost in class javax.servlet.http.HttpServletrequest - The HTTP request.response - The HTTP response.
java.io.IOException - On any I/O error.public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServlet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||