Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>OK, I found out : apparently (looking at the stack trace I posted in the question) , GAE did not allow Jersey to use its classloader to scan the available rest resources. So, I read in detail the Jersey documentation <a href="http://jersey.java.net/nonav/documentation/latest/user-guide.html#d4e188" rel="noreferrer">the Jersey documentation regarding the deployments</a> and I found out that I can manually specify the Rest resources to Jersey.</p> <p>Here is the web.xml :</p> <pre><code>&lt;servlet-mapping&gt; &lt;servlet-name&gt;Jersey Web Application&lt;/servlet-name&gt; &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;Jersey Web Application&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;javax.ws.rs.Application&lt;/param-name&gt; &lt;param-value&gt;sample.hello.bean.MyApplication&lt;/param-value&gt; &lt;/init-param&gt; &lt;/servlet&gt; </code></pre> <p>You can notice I now have an Application class :</p> <pre><code> package sample.hello.bean; import java.util.HashSet; import java.util.Set; import javax.ws.rs.core.Application; import sample.hello.resources.HelloResource; public class MyApplication extends Application { public Set&lt;Class&lt;?&gt;&gt; getClasses() { Set&lt;Class&lt;?&gt;&gt; s = new HashSet&lt;Class&lt;?&gt;&gt;(); s.add(HelloResource.class); return s; } } </code></pre> <p>Just specify manually your rest resources adding them to the set. Works with jersey-bundle-1.14.jar</p>
 

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