GWTP Spring dispatch and GWTTestCase - No bean named 'HttpRequestHandlerServlet'
I am trying to create a simple integration test using GWTTestCase. I am aware of other strategies for doing that (Selenium, etc.). However, I have reasons to run GWTTestCase tests as well so this is still important to me ;)
Main application works fine in both web and dev mode. However when I run my GWTTestCase I get this:
2013-09-20 11:28:28,044 DEBUG [org.apache.http.impl.conn.
...
[WARN] /com.media.frontend.
These are excerpts from my configs/Java:
src/main/webapp/WEB-INF/web.
!-- Creates the Spring Container shared by all Servlets and Filters --> <listener> <listener-class>org.springframework .web.context.ContextLoaderListener </listener-class> </listener> <!-- Java-based annotation-driven Spring container definition --> <context-param> <param-name>contextClass</param -name> <param-value>org.springframework .web.context.support.AnnotationConfigWebApplicationContext </ param-value> </context-param> <servlet> <servlet-name>dispatch</servlet -name> <servlet-class>org.springframework .web.context.support.HttpRequestHandlerServlet </servlet-class > </servlet> <servlet-mapping> <servlet-name>dispatch</servlet -name> <url-pattern>/dispatch/*</url-pattern> </servlet-mapping>
No servlet entries are present in MediaFrontend.gwt.xml - Main application gwt module configuration
MediaFrontendJUnit.gwt.xml:
<module> <!-- Inherit our applications main module. --> <inherits name='com.media.frontend.MediaFrontend' /> <source path="client" /> <source path="gwt" /> <servlet path="/dispatch/*" class="org.springframework.web.context.support.HttpRequestHandlerServlet" /> </module>
I was able to find a solution by myself which is absolutely not acceptable because it puts Test-related configuration in my production environment: it works fine when I add this mapping to my src/main/webapp/WEB-INF/web.
<servlet-mapping> <servlet-name>dispatch</servlet -name> <url-pattern>/com.media.frontend .MediaFrontendJUnit.JUnit/dispatch /*</url-pattern> </servlet-mapping>
I've been really struggling with this for a long time and still have no idea why it happens. I'm really looking to any suggestions and help from you. Thanks!
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.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home