Servlet - DWR DirectWebRemoting AJAX problem

  • Filter
  • Time
  • Show
Clear All
new posts

    Servlet - DWR DirectWebRemoting AJAX problem

    I am trying to get a servlet working that uses the DWR jar to provide easy AJAX support for some web pages - this is delivered in a file - services.war.

    I have tested the war file on my own local Apache/tomcat and it works fine.

    The war file seems to have exploded OK on the eUKHost machine and I can view in a browser an html file from the war.

    The problem occurs with the autogenerated javascript files that the DWR servlet produces. The index.html file has script includes for two files dwr/engine.js and one particular to my servlet dwr/interface/ServiceCtrl.js. When I look at the contents of these files in FireBug they're showing a HTTP 404 error and 'The requested URL /services/dwr/engine.js was not found on this server.'

    Looking at the http://<website url>/services/dwr should also list the Java interfaces that I can call onto but that gives a 404 too.

    The servlet mapping is as follows


    So I would expect the urls above to be passed to the servlet.

    Has anyone else any experience of getting DWR to work? Or how to fix the above.

    Many thanks

    Tony P

    Solution was - to contact support and they added a mount point for the servlet directory.


      WAR file / servlet advice

      Hi Tony

      I'm relatively new to web development, I have a lot of experience with C++, C, Java a bit of php and Symbian C++.

      Would you mind If I asked you a couple of generic servlet / war file questions? I ask as you are using the same hosting company as me and seem to know about servlets.

      I have started to created a site using the google web toolkit (GWT). So far my server side my code inserts and selects from a mysql database using JDBC.

      Having "built" everything where the appropriate javascript is created and all runs fine and accesses my DB using the tomcat server that comes with the GWT I want to make sure I am going to be able to deploy the site somewhere. shows everything I have placed on the server.
      If I go to it is not possible to add a new user because something is wrong with the set-up - the client side does not appear to be able to talk to the server side.

      I hope it would not be to ambiguous to ask where you think I might be going wrong? My eclipse plugin for the GWT also has the ability to build a WAR file for me. What is a war file and is it appropriate to me.

      The site is for a university project. I am hosting here and not on my university servers as they do not have tomcat servers for student use.

      Everything works fine from my computer when using the tomcat server that comes with the GWT.

      Many Thanks for any help you can provide.



        Hi Dan.. I've replied to your other post here. Please let us know if that has sorted out your problem..
        Rock _a.k.a._ Jack Daniel

        Follow eUKhost on Twitter || Join eUKhost Community on Facebook


          Hi Dan. It looks like the support team have sorted your problem for you. I think the only question left is - about war files. War files are basically zip files containing all your deliverable files - jars, property files, class files, etc but they tend to follow a standard structure. The tomcat server will take the war file and unpack it. If you look at the docs for tomcat 5.5 at web site, it should give you some information.

          Its a question of choice whether you use a war file I think, although it seems easier to me to just deploy one file.


            Even I am also facing the same problem, i need help on how to upload gwt project to windows hosting
            thanks in advance.