Hi there,

I'm using GWT from within STS (Eclipse) and I'm trying to test out an HTTP 
request to a servlet that's also part of the same project. Unfortunately the 
servlet does not appear to be started up (no call to init()). In addition 
I'm getting a 404 status. Without further ado:

public class GetLatestTradesRequestTest extends GWTTestCase {


  GetLatestTradesRequest getLatestTradesRequest;


  @Override

  public void gwtSetUp() {

    getLatestTradesRequest = new GetLatestTradesRequest();

    getLatestTradesRequest.setUrl(GWT.getModuleBaseURL()

        + "testServlet/trades/recent");

  }


  public void testExecute() throws RequestException {

    // Perform an http request by calling getLatestTradesRequest

  }


  @Override

  public String getModuleName() {

    return "com.abc.testgwt";

  }

I've configured my servlet in web.xml:

  <servlet>

    <servlet-name>testServlet</servlet-name>

    <servlet-class>com.abc.server.TestServlet</servlet-class>

  </servlet>


  <servlet-mapping>

    <servlet-name>testServlet</servlet-name>

    <url-pattern>/testServlet/*</url-pattern>

  </servlet-mapping>

...and then run the test using "Run As" -> "GWT JUnit Test".

If run the application I can navigate to the /testServlet url just fine... 
it is just when I run my GWT Unit Test that my servlet does not appear to be 
there.

Am I missing something here?

Kind regards,
Christopher

-- 
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