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 <[email protected]>

>
> 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 <[email protected]>
> wrote:
> > 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 <[email protected]>
> >
> > > 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
> >
> > > On Wed, Oct 7, 2009 at 1:23 PM, Uros Trebec <[email protected]>
> wrote:
> >
> > >> 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
> >
>

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