Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I started one year ago to develop an app with Jersey and Google App Engine. Great experience from my side, but I have never worked with Restlet ..</p> <p>I try here to summarize the main difficulties I found in GAE integration:</p> <ul> <li>Jersey version: 1.6 works</li> <li>I suggest you to use Jackson (version 1.7.1) for json representation</li> </ul> <p>web.xml fragment:</p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;jersey&lt;/servlet-name&gt; &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt; &lt;param-value&gt;***package-with-your-classes***;org.codehaus.jackson.jaxrs&lt;/param-value&gt; &lt;/init-param&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; </code></pre> <p>Configurator:</p> <pre><code>@Provider public class JAXBContextResolver implements ContextResolver&lt;JAXBContext&gt; { private AnnoxAnnotationReader annotationReader; private JAXBContext context; private Class&lt;?&gt;[] classTypes = new Class[] { .. all your classes .. }; public JAXBContextResolver() { annotationReader = new AnnoxAnnotationReader(); Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;(); properties.put(JAXBRIContext.ANNOTATION_READER, annotationReader); try { this.context = JAXBContext.newInstance(classTypes, properties); } catch (JAXBException e) { .. } public JAXBContext getContext(Class&lt;?&gt; objectType) { return context; } </code></pre> <p>.. as you can see I use Annox to avoid annotations inside my model classes!</p> <p>Hope it helps! Michele Orsi</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload