Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:10:58+00:00 2026-05-26T23:10:58+00:00

I am using DWR for one of my application. I have setup the environment

  • 0

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 http://directwebremoting.org/dwr/introduction/remoting_options.html.

I tried creating sample application and run on tomcat. But I was unable to get any result from server. It was saying 404.

This is my call:

         $.post("/DWRDemo/dwr/jsonp/Demo/sayHello/" + name, { },
          function(data) {
              dwr.util.setValue("demoReply", data.reply);
          }, "jsonp"); 
      } 

where

DWRDemo: Application name

Demo: class name

sayHello : method name

=====================================================================

dwr.xml

<create creator="new" javascript="Demo">
    <param name="class" value="org.getahead.dwrdemo.simpletext.Demo"/>
</create>

=====================================================================

web.xml

      <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <display-name>DWR Servlet</display-name>
    <description>Direct Web Remoter Servlet</description>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
     <param-name>jsonpEnabled</param-name>
     <param-value>true</param-value>
    </init-param>

     <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
  </init-param>
</servlet>


<servlet-mapping>
  <servlet-name>dwr-invoker</servlet-name>
  <url-pattern>/dwr/*</url-pattern>
</servlet-mapping> 

=====================================================================

And I have included the required .js files in my html

====================================================================

Is there any other configuration that I am missing.

Appreciate your help.

Regards,

Ronak

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:10:59+00:00Added an answer on May 26, 2026 at 11:10 pm

    I have found the resolution. Actually, I was using DWR.jar (version 2.7). But looks like it does not support servlet call. I tried with DWR.jar (version 3.0) and it worked straight away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery AJAX, can we call a specific JAVA method (e.g. From an Action
My current task is to migrate a J2EE application (JDK5) that is using DWR
We have a server written in java, and an application written in phonegap for
I have been using DWR for couple of months in my project. i tried
I have a DWR action with a method signature as follows: String joinGroup(String groupId,
I'm using dwr and spring and I get this error: java.lang.IllegalArgumentException: Javascript name *
I am developing a CRUD application using DWR & Jquery. I want to display
I want to open a pdf file from DWR call. I am using DWR
Using C# for ASP.NET and MOSS development, we often have to embed JavaScript into
Using android 2.3.3, I have a background Service which has a socket connection. There's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.