Hi Juan, I'm assuming that you're trying to use the specialized Spring-supporting subclass in hosted mode?
If that's the case, the reason why this wouldn't work is because the embedded Tomcat instance that the hosted mode shell uses is not configured as a Spring container. If you wanted to use hosted mode with your Spring servlets, you would need to have these servlets defined on your own web server, say Tomcat, that you could then use in hosted mode by passing in the -noserver flag. You can read more about this at the FAQ linked below: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_HostedModeNoServer Hope that helps, -Sumit Chandel On Wed, Sep 17, 2008 at 5:35 PM, Juan <[EMAIL PROTECTED]> wrote: > > Hi, > > In short, my problem is that GWT is unable to locate the <servlet> > annotations in the .gwt.xml descriptor when I intercept the call to > the GWT development servlet. Except for the servlets on the > descriptor, all the GWT calls are processed without problems. > > My goal is to catch some petitions to handle them using Spring while > passing the rest to the GWT development servlet. For this I extend the > GWTShellServlet as a Spring MVC adapter. As a consequence of this it's > no longer a servlet. Spring instances class that extends > GWTShellServlet, gives the ServletContext to it and I overwrite the > getServletContext() method to return it. > > Here it is in short: > > public class GwtDevelopmentAdapter extends GWTShellServlet implements > HandlerAdapter, ServletContextAware { > > private ServletContext servletContext; > > public void setServletContext( ServletContext servletContext ) > { > this.servletContext = servletContext; > } > > // At one point I catch the Spring method handle and redirect the > call to the GWTShellServlet > > public ModelAndView handle( HttpServletRequest request, > HttpServletResponse response, Object handler ) throws Exception > { > processFileRequest( request, response ); > > return null; > } > } > > It works without problems except when you define a <servlet> in > the .gwt.xml module descriptor. It just doesn't find that servlet. > > The code and idea are largely based on the post > http://blog.digitalascent.com/2007/11/gwt-rpc-with-spring-2x_12.html > > Any comment, suggestion, different approach would be really welcome. > > Thanks in advance, > Juan > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
