@Documented @Target(value=TYPE) @Retention(value=RUNTIME) public @interface XapiServlet
xapi.test.server.TestServer, and to generate web.xml during
mvn process-resources| Modifier and Type | Required Element and Description |
|---|---|
String |
prefix
Required attribute; this is the string prefix after /xapi in the servlet url.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends javax.servlet.http.HttpServlet> |
servletType
Optional attribute; an HttpServlet class to use as an ancestor to this servlet.
|
public abstract String prefix
public abstract Class<? extends javax.servlet.http.HttpServlet> servletType
ObjectServlet will give you a
simple bean-model endpoint for an object.
if prefix = "Bean",
&& servletType == ObjectServlet,
/xapi/Bean/new/id -> new bean (never null)
/xapi/Bean/get/id -> get bean (null if doesn't exist)
/xapi/Bean/has/id -> check bean != null
/xapi/Bean/del/id -> delete bean
/xapi/Bean/set/id/data -> set bean
/xapi/Bean/up/id/data -> update bean
Copyright © 2012-2013 The Internet Party. All Rights Reserved.