How to get GWT 2.0 and Restlet 2.0 to play nice

Posted by Holograham on Stack Overflow See other posts from Stack Overflow or by Holograham
Published on 2010-04-26T02:30:52Z Indexed on 2010/04/26 2:33 UTC
Read the original article Hit count: 534

Filed under:
|

Hello,

I am having trouble getting Restlet to play nice with GWT in the same project. I have been trying the examples from Restlets website to no avail

I am using Eclipse, Maven2 plugin, GWT, and Restlet GWT. I have never used server side code in this GWT project before and I know there is some custom setup involved. I am deploying locally for the time being using the built in Jetty in GWT Hosted Mode. I can get my front end to display but my back end is not executing.

I did add this to my web.xml file which is from the example (for the time being I am trying to drop the example into my project).

    <servlet>
    <servlet-name>adapter</servlet-name>
    <servlet-class>org.restlet.ext.gwt.GwtShellServletWrapper</servlet-class>
    <init-param>
        <param-name>org.restlet.application</param-name>
        <param-value>org.restlet.example.gwt.server.TestServerApplication</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>adapter</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

I did notice that my web.xml file is located separately from my war deployment directory. My project dir structure is setup as follows.

Project Root
   src/main/java
   src/main/resources
   src/main/test
   JRE
   Maven Dependecies
   GWT SDK
   src
      main
          webapp
              WEB-INF
                 web.xml
   target
   war
      <my project dir>
      WEB-INF
         lib
   pom.xml

So there is no web.xml under my war files WEB-INF directory. I am new to this type of application so it is most likely a matter of me not understanding the directory structure and how my GWT project is compiling into these dirs.

Any help is appreciated! If I need to provide any more info let me know.

Thanks

© Stack Overflow or respective owner

Related posts about gwt

Related posts about restlet