Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Howto execute maven-antrun-plugin after gwt:gwt phase
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Malte  
View profile  
 More options Oct 18 2008, 5:53 pm
From: Malte <mlegenhau...@gmail.com>
Date: Sat, 18 Oct 2008 14:53:07 -0700 (PDT)
Local: Sat, Oct 18 2008 5:53 pm
Subject: Re: Howto execute maven-antrun-plugin after gwt:gwt phase
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.