title: DWR using get / post url
body: <p>I am using DWR for one of my application. I have setup the environment and clear about how to make call to Java functions using the ClassName.method() approach. But I want to use jsonp style approach mentioned here <a href="http://directwebremoting.org/dwr/introduction/remoting_options.html" rel="nofollow">http://directwebremoting.org/dwr/introduction/remoting_options.html</a>. </p>
  
  <p>I tried creating sample application and run on tomcat. But I was unable to get any result from server. It was saying 404.</p>
  
  <p>This is my call:</p>
  
  <pre><code>         $.post("/DWRDemo/dwr/jsonp/Demo/sayHello/" + name, { },
            function(data) {
                dwr.util.setValue("demoReply", data.reply);
            }, "jsonp"); 
        } 
  </code></pre>
  
  <p>where </p>
  
  <p>DWRDemo: Application name</p>
  
  <p>Demo: class name</p>
  
  <p>sayHello :  method name</p>
  
  <p>=====================================================================</p>
  
  <p>dwr.xml </p>
  
  <pre><code>&lt;create creator="new" javascript="Demo"&gt;
      &lt;param name="class" value="org.getahead.dwrdemo.simpletext.Demo"/&gt;
  &lt;/create&gt;
  </code></pre>
  
  <p>=====================================================================</p>
  
  <p>web.xml</p>
  
  <pre><code>      &lt;servlet&gt;
      &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;
      &lt;display-name&gt;DWR Servlet&lt;/display-name&gt;
      &lt;description&gt;Direct Web Remoter Servlet&lt;/description&gt;
      &lt;servlet-class&gt;org.directwebremoting.servlet.DwrServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
       &lt;param-name&gt;jsonpEnabled&lt;/param-name&gt;
       &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
  
       &lt;init-param&gt;
      &lt;param-name&gt;debug&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/servlet&gt;
  
  
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/dwr/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt; 
  </code></pre>
  
  <p>=====================================================================</p>
  
  <p>And I have included the required .js files in my html 
          
      
      
      </p>
  
  <p>====================================================================</p>
  
  <p>Is there any other configuration that I am missing.</p>
  
  <p>Appreciate your help.</p>
  
  <p>Regards,</p>
  
  <p>Ronak</p>