Using same RPC servlet by mutliple modules

5 views
Skip to first unread message

smiletolead

unread,
Nov 20, 2009, 8:20:51 AM11/20/09
to Google Web Toolkit
Hi all,
I have a project with 2 modules. The modules are sharing a RPC
servlet. The idea is to use single RPC servlet for multiple Service
interfaces. The interfaces reside in different modules. I am facing
one problem when use * in the URL pattern. The servlet is not getting
invoked when I use the URL patter as "/*/moduleA". It is expecting me
to specify the exact URL. Can anyone tell me what the problem is?

Regards,

Kamal Chandana Mettananda

unread,
Nov 20, 2009, 8:28:17 AM11/20/09
to google-we...@googlegroups.com
Hi,

When you specify the servlet url-pattern; you must specify the path you expects without wild cards in the middle of the url-pattern. (wild card character can be a suffix in a url pattern).

Cheers,
Kamal
http://lkamal.blogspot.com




--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.



Fabio

unread,
Nov 20, 2009, 9:07:40 PM11/20/09
to Google Web Toolkit
Maybe GuiceRemoteServiceServlet fits your needs. All the services are
mapped to the same url, and GuiceRemoteServiceServlet uses Guice
dependency injection to choose one appropriate service implementation,
that serves the service interface on which the request was made.

hope it helps

On 20 nov, 11:28, Kamal Chandana Mettananda <lka...@gmail.com> wrote:
> Hi,
>
> When you specify the servlet url-pattern; you must specify the path you
> expects without wild cards in the middle of the url-pattern. (wild card
> character can be a suffix in a url pattern).
>
> Cheers,
> Kamalhttp://lkamal.blogspot.com
>
> On Fri, Nov 20, 2009 at 6:50 PM, smiletolead <kumar.gane...@gmail.com>wrote:
>
>
>
> > Hi all,
> >   I have a project with 2 modules. The modules are sharing a RPC
> > servlet. The idea is to use single RPC servlet for multiple Service
> > interfaces. The interfaces reside in different modules. I am facing
> > one problem when use * in the URL pattern. The servlet is not getting
> > invoked when I use the URL patter as "/*/moduleA". It is expecting me
> > to specify the exact URL.  Can anyone tell me what the problem is?
>
> > Regards,
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .

smiletolead

unread,
Nov 22, 2009, 10:13:00 AM11/22/09
to Google Web Toolkit
Specifying the wild card did not work some reason.

On Nov 20, 6:28 pm, Kamal Chandana Mettananda <lka...@gmail.com>
wrote:
> Hi,
>
> When you specify the servlet url-pattern; you must specify the path you
> expects without wild cards in the middle of the url-pattern. (wild card
> character can be a suffix in a url pattern).
>
> Cheers,
> Kamalhttp://lkamal.blogspot.com
>
> On Fri, Nov 20, 2009 at 6:50 PM, smiletolead <kumar.gane...@gmail.com>wrote:
>
>
>
> > Hi all,
> >   I have a project with 2 modules. The modules are sharing a RPC
> > servlet. The idea is to use single RPC servlet for multiple Service
> > interfaces. The interfaces reside in different modules. I am facing
> > one problem when use * in the URL pattern. The servlet is not getting
> > invoked when I use the URL patter as "/*/moduleA". It is expecting me
> > to specify the exact URL.  Can anyone tell me what the problem is?
>
> > Regards,
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .

smiletolead

unread,
Nov 22, 2009, 10:14:24 AM11/22/09
to Google Web Toolkit
I want know why it does not work without using Guice. Because
specifying a URL pattern with wild card is working for a normal
servlet but it is not working for a RPC servlet

Sripathi Krishnan

unread,
Nov 23, 2009, 2:13:28 AM11/23/09
to google-we...@googlegroups.com
AFAIK - you can only specify a wild card at the end of the URL. A * in the middle is treated as a literal, and not a wild card.

See - http://www.velocityreviews.com/forums/t133725-using-wildcard-character-in-web-xml-with-tomcat-5-a.html


--Sri


2009/11/22 smiletolead <kumar....@gmail.com>
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.

smiletolead

unread,
Nov 23, 2009, 10:22:02 PM11/23/09
to Google Web Toolkit
Thanks for the reply. I found that using the URL pattern '/moduleA/*'
did not work. But as per the rule it should have work. My
intention was to call the RPC which has the exact URL pattern as '/
moduleA/greet'

On Nov 23, 12:13 pm, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:
> AFAIK - you can only specify a wild card at the end of the URL. A * in the
> middle is treated as a literal, and not a wild card.
>
> See -http://www.velocityreviews.com/forums/t133725-using-wildcard-characte...
>
> --Sri
>
> 2009/11/22 smiletolead <kumar.gane...@gmail.com>
> > > > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com><google-web-toolkit%2Bunsubs

smiletolead

unread,
Nov 25, 2009, 3:35:02 AM11/25/09
to Google Web Toolkit
Thanks for the reply Sripathi

On Nov 23, 12:13 pm, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:
> AFAIK - you can only specify a wild card at the end of the URL. A * in the
> middle is treated as a literal, and not a wild card.
>
> > > > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com><google-web-toolkit%2Bunsubs
Reply all
Reply to author
Forward
0 new messages