Welcome to GWT. You can try read this first:

1) Best Practices!!! gwt

http://dl.google.com/io/2009/pres/Th_0200_GoogleWebToolkitArchitecture-BestPracticesForArchitectingYourGWTApp.pdf

2) gwt-dispatch + spring
http://pgt.de/2009/09/16/use-spring-with-gwt-dispatch/
http://pgt.de/2009/12/09/sample-gwt-dispath-project/

gwt-dispatch implement a best practice to communicate to server via
GWT-RPC.

Juan

2011/4/14 João Peixoto <[email protected]>

> Hi everyone
> First post, so lets not blow it
> I did post this in the Spring forums as well.
>
> I've been searching quite a lot for ways to integrate GWT with Spring,
> but so far I haven't found any working method.
> I think that the problem is that some detail step is missing, but
> nevertheless here goes what I have and hopefully someone can help me.
>
> The APP I'm trying to create right now is a Spring enabled greeting
> service. What I've done:
>
> com.demo.client.DemoService
> com.demo.client.DemoServiceAsync
> com.demo.server.DemoServiceImpl
>
> The classes themselves are pretty straight forward.
>
> web.xml added the following:
>
> Code:
> <servlet>
>                <servlet-name>DemoSpring</servlet-name>
>
>  <servlet-class>org.springframework.web.servlet.DispatcherServlet</
> servlet-class>
>                        <load-on-startup>1</load-on-startup>
>        </servlet>
>        <servlet-mapping>
>                <servlet-name>DemoSpring</servlet-name>
>                <url-pattern>*.rpc</url-pattern>
>        </servlet-mapping>
> DemoSpring-servlet.xml has the following:
>
> Code:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
>         "http://www.springframework.org/dtd/spring-beans.dtd";>
> <beans>
>        <bean id="demoService" class="com.demo.server.DemoServiceImpl" />
>        <bean id="urlMapping"
> class="org.gwtwidgets.server.spring.GWTHandler">
>                <property name="mapping">
>                        <map>
>                                <entry key="/demoService.rpc"
> value-ref="demoService" />
>                        </map>
>                </property>
>        </bean>
> </beans>
> The way I instantiate the service on the client is:
>
> Code:
> private final DemoServiceAsync demoService =
> GWT.create(DemoService.class);
>
> The problem I'm currently getting is Class Not Found, regarding
> GWTHandler in the urlMapping bean.
>
> I understand that URL requests have to be redirected to the Spring
> dispatcher, however I'm having a hard time to understand how a
> "@Service" Spring stereotype will relate to a GWT
> "@RemoteServiceRelativePath" and most of all, how to achieve it..
>
> Any tips would be much appreciated.
> Best 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 [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.
>
>

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