public class JESTServlet extends 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 String |
INIT_PARA_STANDALONE |
static 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(HttpServletRequest request,
HttpServletResponse response)
Peeks into the servlet path of the request to create appropriate
JEST command . |
protected boolean |
findPersistenceUnit() |
protected void |
handleError(JPAServletContext ctx,
Throwable t) |
void |
init(ServletConfig config) |
void |
log(String s) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log
public static final String INIT_PARA_UNIT
public static final String INIT_PARA_STANDALONE
protected static Localizer _loc
public void init(ServletConfig config) throws ServletException
init
in interface Servlet
init
in class GenericServlet
ServletException
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
JEST command
.
Passes the request on to the command which is responsible for generating a response.doGet
in class HttpServlet
ServletException
IOException
protected void createPersistenceUnit() throws ServletException
ServletException
protected boolean findPersistenceUnit()
protected void handleError(JPAServletContext ctx, Throwable t) throws IOException
IOException
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
public void log(String s)
log
in class GenericServlet
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.