2
votes

sorry for my English I have an GWT project. I wont to use server classes on client side.

I have RPC service that returns object "Route"

@RemoteServiceRelativePath("springGwtServices/RouteService")
public interface IRouteService extends RemoteService {
    public ArrayList<Route> searchRoutes(String from, String to);
}

but I cant use this class on client side. When I tried to import this, I get exception "Route cannot be resolved to a type" Can I use this class on server? If I cant, what I must to do? p.s. I put all needed classes to share folder and get exception

No source code is available for type project.shared.Route; did you forget to inherit a required module
2

2 Answers

4
votes

There will be a package called shared where you can use those classes both on server and client side.

You cannot use server packaged classes on client side.

And be careful before you putting something in shared package. Have a read GWT - What to put in the shared folder?

3
votes

Make sure that you have <source path="shared"/> in your *gwt.xml