3 Replies Latest reply on Jan 2, 2008 7:22 PM by BaTien Duong

    GWT and SeamResourceServlet

    Anthony Homan Newbie

      Is anyone successfully using GWT 1.4 and Seam 2.0? I've noticed a few errors in the reference documentation regarding GWT integration and the remoting/gwt example doesn't work out of the box (the start page in the gwt-shell ant target is incorrect and the embedded tomcat server web.xml doesn't have any servlet mapping defined), so I'm wondering if I should spend any more time on this integration if the GWT integration is not really ready to be used.

      My problem is in the RPC call from GWT to the SeamResourceServlet. I get a 404 "no resource found" message no matter what I do. I have also tried to go directly to http://localhost:8080//seam/resource/gwt directly in a browser, and I receive a 404 response. If I go to http://localhost:8080//seam/resource/remoting I received a 200 response with an empty body which is what I would expect. It seem like the GWT component is not even enabled in the SeamResourceServlet. Is there something else I should enable or configure? I have the seam resource servlet mapped in my web.xml to /seam/resource/* and I have tried using just about every URL variant in the client GWT RPC code (absolute URL above, "/seam/resource/gwt" and "GWT.getModuleBaseURL() + /seam/resource/gwt").

      I'd really like to get this working, but don't want to spend much more time on it if GWT/Seam is just really not ready for prime-time.

      Thanks for any help!

      Anthony

        • 1. Re: GWT and SeamResourceServlet
          BaTien Duong Newbie

          I have not solved this problem either and has not time to closely look at how SeamResourceServlet is integrated with GWT. Following are what i have tried and still Not able to solve a simple RPC call yet.

          1) Starting from Seam-2.0.1CR1, i rearrange jpa booking example to make sure that it works from the source. Similarly, i re-custom GWT Kitchen sink to make it work for my purpose.
          2) To hook GWT and Seam together, i follow the Seam-GWT chapter in the ref doc. The ant task does not wotk, so i write my simple ant task to transfer GWT generated client system to seam webapp that the index page is pointed to. The task also transfers required client objects such as the service, ValidationUtility and serializable transfer object to the client module under Seam to be recompiled under jdk6 (instead of jdk4 for the client system) with gwt-servlet-1.4 taken from GWT package.
          3) The SeamResourceServlet is mapped in web.xml to /hub/resource/* and the endpoint URL in GWT widget to invoke the async service is mapped to /hub/resource/gwt. Different mappings are tried with no better result.
          4) Putting the compiled seam application to tomcat 6, GWT client-side system is up appropriately. Using the suggested ValidationUtility in both client and server side, i see the ValidationUtility work on the client side. But once it passes the validation to be send to the server, the seam server implementation does not response and the communication between client-server always fail. The problem may come from the connection point between GWT generated implementation of XxxServiceAsync and seam component implementation of XxxServiceImpl.

          I do like to have this simple integration ironed out before we can do any things more interesting. Hope someone can help.

          BaTien, dbgroups

          • 2. Re: GWT and SeamResourceServlet
            Shane Bryzak Master

            I just tested the GWT example in latest CVS (after doing a clean build) and it works fine. Your URL (http://localhost:8080//seam/resource/gwt) seems to be missing the context path, perhaps that is your problem?

            • 3. Re: GWT and SeamResourceServlet
              BaTien Duong Newbie

              Hi Shane:

              Have you tried with just tomcat6 (jdk1.6) and GWT-1.4 (jdk1.4)? As explained in my posting, i use Seam-2.0.1-CR1, mapped SeamResourceServlet to /hub/resource/* and the endpoint URL in GWT widget to /hub/resource/gwt. I make sure that it works as stand-alone Seam Jpa example and GWT KitchenSink. The RPC integration did not work for me :-(. Is it worth to try the latest version from the source?

              Thanks
              BaTien, dbgroups