AnsweredAssumed Answered

creating rest support in my web application.

Question asked by shiva.arunachala on Mar 24, 2015
Latest reply on Mar 24, 2015 by jbarrez
I have made rest calls by deploying activiti-rest war in tomcat and invoking the url from my web application by

url = new URI("http://localhost:8081/activiti-rest/service/identity/users");


Now i dont want to deploy the activiti-rest as a different webapplication but want to just add rest jar and hit the rest servlet. Now what changes i want to make?

My guess would be to add below in web.xml

<blockcode>
<!– Restlet adapter –> 
  <servlet> 
    <servlet-name>RestletServlet</servlet-name> 
    <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
    <init-param>
      <!– Application class name –>
      <param-name>org.restlet.application</param-name>
      <param-value>org.activiti.rest.common.application.ActivitiRestApplication</param-value>
    </init-param>
  </servlet>
 
  <!– Catch all requests –> 
  <servlet-mapping> 
    <servlet-name>RestletServlet</servlet-name> 
    <url-pattern>/service/*</url-pattern> 
  </servlet-mapping>
</blockcode>

and then hit the url like…
url = new URI("http://localhost:8081/myWebApp/service/identity/users");


Am i right in saying so? or have i missed anything else.?
Thanks in advance.

Outcomes