|Re: Setup for Standalone RAP with Spring [message #1148834 is a reply to message #1145012]
||Mon, 21 October 2013 19:33
| Stefan Klaus
Registered: February 2011
I found an solution which works for me. As described in the Spring Vaadin Integration you could easily use this code to get a spring managed bean (Configuration in web.xml via org.springframework.web.context.ContextLoaderListener):|
ServletContext servletContext = RWT.getUISession().getHttpSession()
WebApplicationContext context = WebApplicationContextUtils
TestService testService = (TestService) context.getBean("testService");
I had to fight with the RWT Launcher as it only takes the web.xml from the WEB-INF Folder and ignores anything else in there. As my applicationContext.xml also was in the WEB-INF folder, the spring context was never loaded with RWT Launcher.
Now i am using the wtp tools to deploy to a tomcat and everything works fine.
Powered by FUDForum
. Page generated in 0.12546 seconds