Jens, are you sure of what you're saying ? The GWT services have to be servlets AFAIK, and are actually managed by the servlet container in the given wiki page.
BTW, I'd strongly recommend to remove the spring4gwt dependency and understand what it does. That is to say :
@SuppressWarnings("serial")
public class SpringRemoteServiceServlet extends RemoteServiceServlet {
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
AutowireCapableBeanFactory factory = context.getAutowireCapableBeanFactory();
factory.autowireBean(this);
}
}
Your services have to extend SpringRemoteServiceServlet instead of RemoteServiceServlet.
That's it. Less than 10 lines of code do not deserve a dependency =)
On Tuesday, March 5, 2013 11:22:27 AM UTC+1, Borja Gonzalez wrote:
OK, so i finally managed to get it working. This is my solution:--<servlet-mapping><servlet-name>springGwtRemoteServiceServlet< /servlet-name> <url-pattern>userConsole/springGwtServices/*</url- pattern> </servlet-mapping>@RemoteServiceRelativePath("springGwtServices/ GestionUserService") Thanks a lot for everyonw to take the time to help me, and sorry for lack of knowledge. This also helped me to find the answer: http://code.google.com/p/gwt-uml-designer/source/ browse/trunk/GWTUMLDrawer/?r=8
El martes, 5 de marzo de 2013 10:49:48 UTC+1, Jens escribió:Following the linked wiki page you should have<servlet-mapping>
<servlet-name>springGwtRemoteServiceServlet </servlet-name>
<url-pattern>/springGwtServices/* </url-pattern>
</servlet-mapping>and@RemoteServiceRelativePath("springGwtServices/<spring bean name>") So in your case probably: @RemoteServiceRelativePath("springGwtServices/ GestionUserService") You don't need to map your GestionUserService at all in web.xml, as its managed by Spring and not your servlet container. It doesn't even have to be a servlet anymore. Its just a Spring bean.-- J.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment