It's a litte bit more complicated. I am running spring in the embedded
tomcat server and call the gwt shell servlet over the
DispatcherServlet from spring, because the default servlet-mapping /*
for the gwt shell servlet doesn't let me call any other servlet. When
I am now calling the gwt shell servlet from the spring context, the
gwt shell servlet is not able to find the gwt.rpc file in the .gwt-tmp/
shell directory. I don't know exactly why, but I think it is when I am
calling the gwt shell servlet from inside spring the servlet context
changed to the tomcat/webapps/ROOT directory. That why I have to copy
the gwt.rpc file to this directory. When someone can tell me how I can
change the context back to the default directory or how I can
configure the servlet-mapping so that I can call spring besides the
gwt shell servlet I would be happy ;)

Some configurations:

  <servlet>
    <servlet-name>spring</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</
servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>shell</servlet-name>
    <servlet-class>com.google.gwt.dev.shell.GWTShellServlet</servlet-
class>
  </servlet>
  <servlet-mapping>
    <servlet-name>spring</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
  <!--inserted by gwt-maven-->
  <servlet-mapping>
    <servlet-name>shell</servlet-name>
    <url-pattern>/</url-pattern>

Problem is then the shell has the /* mapping everything is handled by
this servlet, cause all other mappings will overwritten by this. So I
let all servlet calls handled by spring. Folling configuration will
handle that:

   <bean id="gwtShellController"
class="org.springframework.web.servlet.mvc.ServletForwardingController">
        <property name="servletName">
                <value>shell</value>
        </property>
   </bean>

   <bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
                <props>
                        <prop key="/*/user.rpc">userController</prop>
                        <prop key="/*">gwtShellController</prop>
                </props>
        </property>
    </bean>

My main goal is to run everything in the hosted browser with the
embedded tomcat server, without calling a jetty instance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"gwt-maven" 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/gwt-maven?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to