title: Hashmap Example in Java using Jersey?
body: <p>I am currently working with with web services for the first time and I have to write some examples of different web services in Jersey using Maven, </p>
  
  <p>But I can only seem to get it to work in Spark (Here's My spark example)</p>
  
  <pre><code>//Hashmap Example
  get("add/:num1/:num2", new Route() {
  
      @Override
      public Object handle(Request rqst, Response rspns) throws Exception {
          rspns.type("application/json");
  
          int num1 = Integer.parseInt(rqst.params(":num1"));
          int num2 = Integer.parseInt(rqst.params(":num2"));
          HashMap&lt;String, Integer&gt; map = new HashMap&lt;&gt;();
          map.put("result", num1+num2);
          Gson gson = new Gson();
          return gson.toJson(map);
      }
  });
  </code></pre>
  
  <p>I just need some help writing it for a Jersey example ?</p>
  
  <p>Any help you can offer would be great</p>