public class JESTServlet
extends javax.servlet.http.HttpServlet
The syntax of the request URL is described in OpenJPA web site.
The response to a resource request is represented in various format, namely
XML, JSON or a JavaScript that will dynamically render in the browser. The format
can be controlled via the initialization parameter response.format
in
<init-param>
clause or per request basis via format=xml|dojo|json
encoded in the path expression of the Request URI.
Servlet initialization parameter
Parameter | Value |
---|---|
persistence.unit | Name of the persistence unit. Mandatory |
response.format | Default format used for representation. Defaults to xml . |
Modifier and Type | Field and Description |
---|---|
protected static Localizer |
_loc |
static java.lang.String |
INIT_PARA_STANDALONE |
static java.lang.String |
INIT_PARA_UNIT
Servlet initialization parameter monikers
|
Constructor and Description |
---|
JESTServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
createPersistenceUnit() |
void |
destroy() |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Peeks into the servlet path of the request to create appropriate
JEST command . |
protected boolean |
findPersistenceUnit() |
protected void |
handleError(JPAServletContext ctx,
java.lang.Throwable t) |
void |
init(javax.servlet.ServletConfig config) |
void |
log(java.lang.String s) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
public static final java.lang.String INIT_PARA_UNIT
public static final java.lang.String INIT_PARA_STANDALONE
protected static Localizer _loc
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
JEST command
.
Passes the request on to the command which is responsible for generating a response.doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void createPersistenceUnit() throws javax.servlet.ServletException
javax.servlet.ServletException
protected boolean findPersistenceUnit()
protected void handleError(JPAServletContext ctx, java.lang.Throwable t) throws java.io.IOException
java.io.IOException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public void log(java.lang.String s)
log
in class javax.servlet.GenericServlet
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.