I think I missed an important point in my earlier post.
The servlets ARE hosted correctly when I run in hosted mode.
But they do not get hosted when I run my junit tests.

Here is my web.xml:
<web-app>

    <!-- Default page to serve -->
    <welcome-file-list>
        <welcome-file>Sample.html</welcome-file>
    </welcome-file-list>

    <!-- Servlets -->
    <servlet>
        <servlet-name>remoteLoggerServiceImpl</servlet-name>
        <servlet-
class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-
class>
    </servlet>

        <servlet-mapping>
        <servlet-name>remoteLoggerServiceImpl</servlet-name>
        <url-pattern>/Sample/gwt-log</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>jUnitHostImpl</servlet-name>
        <servlet-class>com.google.gwt.junit.server.JUnitHostImpl</
servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>jUnitHostImpl</servlet-name>
        <url-pattern>/Sample/junithost</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>eventServlet</servlet-name>
        <servlet-class>mypackage.EventServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>eventServlet</servlet-name>
        <url-pattern>/Sample/eventd</url-pattern>
    </servlet-mapping>

</web-app>

When I run the junit tests for my module, this web.xml is not
considered at all.
But I add a servlet tag to my module.xml as
<servlet path="/eventd" class="MyPackage.EventServlet" />
the servlet gets hosted and my unit tests can successfully connect to
the servlets.
I can even remove web.xml and still it would work fine.

What I suspect is that there is some difference in the way servlet
mapping are to be specified while running junit tests.

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

Reply via email to