I use a servlet in the hosted mode which acts as a proxy since i
cannot directly communicate with the server due to the same origin
policy. Once deployed the servlet is no more needed since both would
run on the same server. So I decided to have a separate module for the
servlet which is inherited by the module of the main project. But the
servlet is only deployed by Jetty when I reference the servlet in the
web.xml of the main project.

With the following setup the servlet is not deployed when running in
hosted mode:

Main Project:
    Main.gwt.xml:
        <module>
              ...
             <inherits name="Servlet"/>
             <entry-point .... />
        </module>

    war
    + WEB-INF
        + web.xml

    web.xml:
        <?xml version="1.0" encoding="UTF-8"?>
        <web-app>
            <welcome-file-list>
                <welcome-file>index.html</welcome-file>
            </welcome-file-list>
        </web-app>

Servlet Project:
    Servlet.gwt.xml:
        <module>
            <servlet class="server.Servlet" path="/servlet" />
        </module>

    war
    + WEB-INF
        + classes
            + ... servlet class
        + lib
            + ...
        + web.xml

    web.xml:
        <?xml version="1.0" encoding="UTF-8"?>
            <servlet>
                <servlet-name>someName</servlet-name>
                <servlet-class>server.Servlet</servlet-class>
            </servlet>

            <servlet-mapping>
                <servlet-name>someName</servlet-name>
                <url-pattern>/servlet</url-pattern>
            </servlet-mapping>
        </web-app>

Is there a way to use server-side code from an inherited module in the
hosted mode without modifying the web.xml of the main project?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to