It was helpful! Thank you very much!
Julia

On Jul 7, 3:49 am, Marcel <[email protected]> wrote:
> Ok, I solved it.
>
> The servlet mapping was the problem. It has to be done in the web.xml
> of the project that inherits the module (in my case, the index
> project). Furthermore, the url-pattern does not include the module's
> project name, but the name of the project that inherits the module (in
> my case  <url-pattern>/index/DatabaseService</url-pattern>).
>
> Maybe this can be helpful for somebody else. ;)
>
> Cheers!
>
> On 6 Jul., 22:03, Marcel <[email protected]> wrote:
>
> > I want to share common functionality between a couple of gwt projects
> > in eclipse (gwt 1.6). More precisely, I have a RPC service called
> > DatabaseService that handles SQL database operations. To use it in
> > different projects, I created a new gwt project in eclipse, called it
> > Services and put the DatabaseService.java and
> > DatabaseServiceAsync.java in the myproject.client package and the
> > DatabaseServiceImpl in the myproject.server package.
>
> > Then, I added that services project to another project's build path
> > (let's call the other project index) and added the following line to
> > the Index.gwt.xml <inherits name='myproject.Services'/>. The packages
> > in the index project are called com.is.client and com.is.server.
>
> > The access from the classes in the com.is.client package to the
> > classes in the myproject.client package works fine, however, when I
> > try to call the RPC service in the myproject.server package from a
> > class in the com.is.client package, I get an HTTP 404 not found error
> > (com.google.gwt.user.client.rpc.StatusCodeException). When I read
> > through the error message, I recognized that the request URI is /index/
> > DatabaseService, but I think, it actually should be /services/
> > DatabaseService. However, I did not find a way to change that.
>
> > Here are the XML files:
>
> > In the index project:
>
> > Index.gwt.xml:
> > <module rename-to='index'>
> >   <!-- Inherit the core Web Toolkit stuff.                        -->
> >   <inherits name='com.google.gwt.user.User'/>
> >   <inherits name='com.google.gwt.user.theme.standard.Standard'/>
> >   <!-- Other module inherits                                      -->
> >          <inherits name='myproject.Services'/>
> >   <!-- Specify the app entry point class.                         -->
> >   <entry-point class='com.is.client.Index'/>
> > </module>
>
> > web.xml:
> >   <!-- Default page to serve -->
> >   <welcome-file-list>
> >     <welcome-file>Index.html</welcome-file>
> >   </welcome-file-list>
>
> > In the services project:
>
> > Services.gwt.xml:
> > <module rename-to='services'>
> >   <!-- Inherit the core Web Toolkit stuff.                        -->
> >   <inherits name='com.google.gwt.user.User'/>
> >   <!-- Specify the app entry point class.                         -->
> >   <entry-point class='myproject.client.Services'/>
> > </module>
>
> > web.xml:
> >   <!-- Default page to serve -->
> >   <welcome-file-list>
> >     <welcome-file>Services.html</welcome-file>
> >   </welcome-file-list>
>
> >   <!-- Servlets -->
> >   <servlet>
> >     <servlet-name>DatabaseServiceImpl</servlet-name>
> >     <servlet-class>myproject.server.DatabaseServiceImpl</servlet-
> > class>
> >   </servlet>
> >   <servlet-mapping>
> >     <servlet-name>DatabaseServiceImpl</servlet-name>
> >     <url-pattern>/services/DatabaseService</url-pattern>
> >   </servlet-mapping>
> > </web-app>
>
> > I also tried putting the servlet name and import in the index
> > project's web.xml file as well, but no change.
>
> > I hope, someone can help me, I really can't find out, what I did
> > wrong.
>
> > Cheers!
> > Marcel
>
>

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