Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:49:08+00:00 2026-06-15T18:49:08+00:00

I am trying to become familiar with using the GWT api to create web

  • 0

I am trying to become familiar with using the GWT api to create web based applications. I have been following some tutorials on GWT and have not yet been able to make an RPC call. Looking at the problem with a broad scope, my goals are to make a server call to run a series of database tests that I know work (ive tested this code).

—EDIT—

I think that the problem here is that the resource is being looked for here:
/MatesWeb/org.matesweb.Main/peopleService

when I think it should be looked for here:
/MatesWeb/peopleService

—END_EDIT—

Here is the info and code I feel is relevant:

-using netbeans

-error that I am getting is “/MatesWeb/org.matesweb.Main/PeopleService – description – The requested resource is not available.”

-GWT.getModuleBaseURL() returns: :8080/MatesWeb/org.matesweb.Main/

-URL in browser is: :8080/MatesWeb/

from web.xml file

<servlet>
    <servlet-name>peopleService</servlet-name>
    <servlet-class>org.matesweb.server.PeopleServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>peopleService</servlet-name>
    <url-pattern>/peopleService</url-pattern>
</servlet-mapping>

From PeopleService Service
package org.matesweb.client;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("PeopleService")
public interface PeopleService extends RemoteService {

String[] saveGetPerson(String[] persInfo);
int runTests();

}

From PeopleServiceImpl
package org.matesweb.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.matesweb.client.PeopleService;

import org.matesweb.server.tests.DbTest;

class PeopleServiceImpl extends RemoteServiceServlet implements PeopleService {

    @Override
    public String[] saveGetPerson(String[] persInfo) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public int runTests()
    {
        int retInt;

        DbTest dbTest = new DbTest();
        retInt = dbTest.runTests();
        return retInt;
    }

}

From PeopleServiceAsync

package org.matesweb.client;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface PeopleServiceAsync
{
  void saveGetPerson(String[] persInfo, AsyncCallback<String[]> persInformation);
  void runTests(AsyncCallback<Integer> retInt);
}

Any idea of whats going on here?

Cheers,
Nick

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:49:09+00:00Added an answer on June 15, 2026 at 6:49 pm
    @RemoteServiceRelativePath("PeopleService")
    

    The @RemoteServiceRelativePath annotation is used to decide what url to hit. This path to the server is relative to the compiled module itself – the gwt app loaded from the path /MatesWeb/org.matesweb.Main/, so the service is being sought out at /MatesWeb/org.matesweb.Main/PeopleService. I assume this means you have an html file in the MatesWeb/ directory (probably the .war file is called MatesWeb?), and inside of there exists the compiled app in org.matesweb.Main/, including the initial JS file, org.matesweb.Main.nocache.js.

    If you want to tell the service to be found at /MatesWeb/peopleService, you have two options. The first is to modify the annotation to back up a directory, something like this:

    @RemoteServiceRelativePath("../peopleService")
    

    Using .., I indicate the parent directory, and I also changed the case of the path part ‘peopleService’ – this may or may not matter. A second option is to set the url programmatically:

    PeopleServiceAsync service = GWT.create(PeopleService.class);
    ((ServiceDefTarget)service).setServiceEntryPoint("/MatesWeb/peopleService");
    

    As referenced in the @RemoteServiceRelativePath javadocs http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.html.

    If, instead, you want to leave the client as is and tell the server that this service should be at the path the client expects, you can modify the web.xml to make the servlet available at the path that the client is currently expecting to find it:

    <servlet-mapping>
        <servlet-name>peopleService</servlet-name>
        <url-pattern>/MatesWeb/org.matesweb.Main/PeopleService</url-pattern>
    </servlet-mapping>
    

    Note again that I’ve changed the case – it may not matter, but I generally like to be consistent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started using google js test and have become stuck trying to unit test
So I have been trying to write jquery that make one element become active
Trying to first .getJSON then using that data to become the source of my
I am trying to start with a circle and have that circle gradually become
I'm been trying to figure this out for a while now, and have just
I am trying to understand LINQ and become confident at using it. What I
I am trying to become familiar with the OSGI platform and I read a
I am trying to become more familiar with test driven development. So far I
I am trying to become familiar with Clojure and so I've started to implement
I started programming in Lua few days ago. I have become familiar with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.