Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Deploying GWT RPC servlet as a separate WAR
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Uros Trebec  
View profile  
 More options Oct 7, 1:23 pm
From: Uros Trebec <uros.tre...@gmail.com>
Date: Wed, 7 Oct 2009 10:23:44 -0700 (PDT)
Local: Wed, Oct 7 2009 1:23 pm
Subject: Deploying GWT RPC servlet as a separate WAR
Hi there!

I was wondering if there is in any way possible to package and deploy
GWT-RPC servlet as a stand-alone WAR application, without client side
JS & resources?

Basically what I want to do is have a client-side JS & resurces
deployable separately from the servlet, so the servlet application
wouldn't be redeployed every time I compile and deploy generated JS.

Any suggestions?

Best regards,
Uros


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Ramsdale  
View profile  
 More options Oct 9, 9:22 am
From: Chris Ramsdale <cramsd...@google.com>
Date: Fri, 9 Oct 2009 09:22:05 -0400
Local: Fri, Oct 9 2009 9:22 am
Subject: Re: Deploying GWT RPC servlet as a separate WAR

Uros,
If you are using GWT style RPC you won't be able to decouple the
client/server relationship as the GWT compiler needs to know about (and
compile) both sides in order for the application to be built. You may want
to take a look at GWT's RequestBuilder class (link below) that allows you to
build GWT based client apps that communicate with a server that may or may
not be GWT based and are ultimately compiled and deployed without having to
do the same with the server.

RequestBuilder Class
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...

Thanks,
- Chris


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sripathi Krishnan  
View profile  
 More options Oct 11, 7:35 pm
From: Sripathi Krishnan <sripathi.krish...@gmail.com>
Date: Sun, 11 Oct 2009 19:35:06 -0400
Local: Sun, Oct 11 2009 7:35 pm
Subject: Re: Deploying GWT RPC servlet as a separate WAR

You should be able to decouple.

   1. Split your code into three logical packages - client, server and
   shared.
      - client package has all UI code
      - shared has the RemoteService and corresponding Async Interfaces,
      plus any Serializable classes needed  for the communication
between client
      and server
      - server has the RPC Servlets, plus any other code needed for server
      components.
   2. Run GWT on client and shared packages. You may want to include a
   <source path='shared'/> and <source path='client'/> lines to your
   module.gwt.xml. Also, during compilation of gwtc, you don't need
   gwt-servlet.jar in your claspath.
   3. When you are compiling server side code, make sure to include java
   files from shared folder. Your classpath should include gwt-server.jar, but
   it doesn't need the client side jar files.
   4. When you bundle your war, gwt-serlvet.jar needs to be present in the
   lib folder.

--Sri

2009/10/9 Chris Ramsdale <cramsd...@google.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saurabh  
View profile  
 More options Nov 5, 6:08 pm
From: Saurabh <saurabh.gu...@citi.com>
Date: Thu, 5 Nov 2009 15:08:20 -0800 (PST)
Local: Thurs, Nov 5 2009 6:08 pm
Subject: Re: Deploying GWT RPC servlet as a separate WAR
Even if the RPC Servlets are separate from the UI code, how would you
let your Async service code know the URL of the RPC servlets which may
be deployed in a different tomcat container all together?

On Oct 11, 6:35 pm, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sripathi Krishnan  
View profile  
 More options Nov 5, 7:15 pm
From: Sripathi Krishnan <sripathi.krish...@gmail.com>
Date: Thu, 5 Nov 2009 19:15:01 -0500
Local: Thurs, Nov 5 2009 7:15 pm
Subject: Re: Deploying GWT RPC servlet as a separate WAR

You just put a @RemoteServiceRelativePath("/path/to/servlet") annotation in
your RPC interface. It just needs the url, not the actual servlet class that
is implementing it - so you are still separating the ui code and the server
code.

Or am I completely missing your point?

--Sri

2009/11/5 Saurabh <saurabh.gu...@citi.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saurabh  
View profile  
 More options Nov 5, 9:01 pm
From: Saurabh <saurabh.gu...@citi.com>
Date: Thu, 5 Nov 2009 18:01:28 -0800 (PST)
Local: Thurs, Nov 5 2009 9:01 pm
Subject: Re: Deploying GWT RPC servlet as a separate WAR
Sri
So consider the scenario where I have two WAR files: First WAR file
contains the RPC service and the contextpath is /allservices and
Second WAR file contains all the generated module code+a-whole-lot-of-
other-stuff. Second WAR file has a context /mycontent The GWT
generated JS is being served from the second WAR file.

The problem that I am facing is that when I get the service using
GWT.create and then modify the ServiceDef using
ServiceDefTarget.setEntry...

I then run into seriliazation issues. Root cause of this issue is that
when an RPC call is being made from WAR2 to WAR1 RPC service, the
moduelBaseURL is different from the contextPath. There is line in
RemoteServiceServlet that goes like this:

if (modulePath == null || !modulePath.startsWith(contextPath))

This check ensures that RPC WAR cannot be separate from rest of the
module. modulePath which is moduleBaseURL passed in the RPC request is
not the same as contextPath. That is always going to be the case,
unless there is an explict way to configure moduleBaseURL for RPC
request.

-Saurabh

On Nov 5, 7:15 pm, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saurabh  
View profile  
 More options Nov 6, 12:14 am
From: Saurabh <saurabh.gu...@citi.com>
Date: Thu, 5 Nov 2009 21:14:29 -0800 (PST)
Local: Fri, Nov 6 2009 12:14 am
Subject: Re: Deploying GWT RPC servlet as a separate WAR
I think overriding RemoteServiceServlet.doSerializationGetPolicy
method might help. Anyways, interesting read on this topic are

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
http://code.google.com/p/google-web-toolkit/issues/detail?id=1863&q=r...

On Nov 5, 9:01 pm, Saurabh <saurabh.gu...@citi.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google