Well, yes. But that's not what I meant. These are the servlet declarations in the DEPLOYMENT descriptor (aka web.xml).
What I meant is you could declare the servlet in the MODULE descriptor (aka mymodule.gwt.xml) of your inherited module. A servlet declaration in a module descriptor looks like this: <servlet class="com.mymodule.Servlet" path="/path" /> However what you still need to do is get an appropriate servlet mapping in the deployment descriptor of the inheriting module. There are several options: - with Maven: use goal "gwt:mergewebxml" - with Ant/GWT compiler: I don't know, ask the group! - manually edit the deployment descriptor like you just proposed, however make sure the url-pattern matches the RemoteServiceRelativePath<http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.html> and probably the "rename-to" directive (not sure about this last point though especially in case both your inherited and the inheriting module declare (different) directives) Hope I did not create more confusion about this. Regards, Andreas 2010/12/8 Metronome / Basic <[email protected]> > Thanks for your help , I think that it must be something like that > so I tried > > <servlet> > <servlet-name>userServlet</servlet-name> > > <servlet-class>metro.app.tmupack.server.MyModServiceImpl</servlet-class> > > > </servlet> > > > <servlet-mapping> > > <servlet-name>userServlet</servlet-name> > > <url-pattern>/metro.app.tmupack/modervice</url-pattern> > > </servlet-mapping> > > where metro.app.tmupack is from the main module but , ie does't work > > I guess that the url of the module have to be addes somehow ? > > Any Idea > > Thanks > > Patrick > > > ----- Original Message ----- From: "Brian Reilly" <[email protected] > > > To: <[email protected]> > Sent: Tuesday, December 07, 2010 8:15 PM > > Subject: Re: RPC in separate module > > > You do have to declare the servlet in the web.xml of the main module. > As such, you have to treat it like it's in the main module. I suspect > the "metro.module.rpcpack" part of the url-pattern is the problem. The > URL pattern is determined by the main module name, not the inherited > module name or the package containing the RPC code. > > -Brian > > On Tue, Dec 7, 2010 at 12:17 PM, Metronome / Basic > <[email protected]> wrote: > >> It certainly is but I cannot find it >> >> I tried >> <servlet> >> >> <servlet-name>userServlet</servlet-name> >> >> >> <servlet-class>metro.module.rpcpack.server.MyModServiceImpl</servlet-class> >> >> </servlet> >> >> >> <servlet-mapping> >> >> <servlet-name>userServlet</servlet-name> >> >> <url-pattern>/metro.module.rpcpack/modervice</url-pattern> >> >> </servlet-mapping> >> >> in the web.xml of the main module >> metro.module.rpcpack is the package name of the module with the rpc >> >> should the declaration of the servlet be in the main module ? >> what is the path >> >> I cannot sort it out >> >> Thanks >> >> Patrick >> >> ----- Original Message ----- From: "Didier Durand" < >> [email protected]> >> To: "Google Web Toolkit" <[email protected]> >> Sent: Tuesday, December 07, 2010 1:08 PM >> Subject: Re: RPC in separate module >> >> >> Hi, >> >> Everything you need is detailed here: >> http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html >> >> On Dec 7, 11:06 am, coelho <[email protected]> wrote: >> >>> >>> Hello >>> >>> I'm trying to bild a small application using RPC to acces SQL data >>> ( jdbc ) >>> >>> It works no problem so far >>> >>> I'd like this application to use modules , so that the code could be >>> reused in others >>> >>> so I'd like to put the SQL parts in a separate module >>> >>> and the question is : >>> >>> How do You declare a servlet that is not in the main module >>> ( application) >>> >>> or am I missing something ? ( probably) >>> >>> Thanks for reading >>> >>> Patrick >>> >> >> -- >> 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]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> >> >> >> >> ----- >> Aucun virus trouvé dans ce message. >> Analyse effectuée par AVG - www.avg.fr >> Version: 10.0.1170 / Base de données virale: 426/3301 - Date: 06/12/2010 >> >> >> -- >> 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]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> >> >> > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > > > ----- > Aucun virus trouvé dans ce message. > Analyse effectuée par AVG - www.avg.fr > Version: 10.0.1170 / Base de données virale: 426/3303 - Date: 07/12/2010 > > > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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.
