Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring Restlet with App engine
    primarykey
    data
    text
    <p>I am using google app engine to develop my software's backend using java along with Restlet framework. I have index.jsp under my war directory which I want to treat as default page when somebody goes to my website(e.g. example.com). So I have mentioned it under welcome-file-list section in web.xml.</p> <pre><code>&lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; </code></pre> <p>Also, I have my Restlet servlet mapped to "/*" in web.xml. </p> <pre><code>&lt;servlet-mapping&gt; &lt;servlet-name&gt;RestletServlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; </code></pre> <p>But the problem occurs here, because even the call to default page i.e. example.com, also goes to the restlet which obviously doesn't find the mapping in its router. So I decided to instead map restlet servlet to "/restlet/*". </p> <pre><code>&lt;servlet-mapping&gt; &lt;servlet-name&gt;RestletServlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/restlet/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; </code></pre> <p>But with this I get the HTTP 404 error because somehow even though web.xml successfully routes the call to restlet, but restlet doesn't find the mapping in this case in its router object. I have obviously changed the mapping in the restlet router to match the new pattern "restlet/*".</p> <pre><code>router.attach("/restlet/doSomething",DoSomething.class); </code></pre> <p>It would be really great if someone can help me with this. Following is my complete web.xml:</p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;RestletServlet&lt;/servlet-name&gt; &lt;servlet-class&gt;org.restlet.ext.servlet.ServerServlet&lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;org.restlet.application&lt;/param-name&gt; &lt;param-value&gt;com.mWallet.loyaltyCardCase.LoyaltyCardCaseWebService &lt;/param-value&gt; &lt;/init-param&gt; &lt;/servlet&gt; &lt;!-- Catch all requests --&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;RestletServlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/restlet/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; </code></pre> <p>Thanks!</p> <p>Manas</p>
    singulars
    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. 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