Hi!
I start my rwt standalone app with an embedded jetty with spring (see configuration below). Now i want to add a static welcome page like mentioned in the RAP FAQ but i have no idea how to?
One more note: Before i started rap in OSGi context. There i added the static resources with org.osgi.service.http.HttpService in the ApplicationConfiguration.
Any ideas?
Stefan
How i startup the jetty with spring
<bean id="eclipseRap" class="org.eclipse.jetty.server.Server"
init-method="start" destroy-method="stop">
<property name="threadPool">
<bean id="ThreadPoolWS" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<constructor-arg value="200" />
</bean>
</property>
<property name="connectors">
<list>
<bean id="ConnectorWS" class="org.eclipse.jetty.server.nio.SelectChannelConnector"
p:port="10080" />
</list>
</property>
<property name="handler">
<bean class="org.eclipse.jetty.server.handler.HandlerCollection">
<property name="handlers">
<list>
<bean class="com.eclipse.RAPServer" init-method="init"/>
</list>
</property>
</bean>
</property>
</bean>
How i add the rwtservlet and merge up the applicationcontext
public class RAPServer extends WebAppContext implements ApplicationContextAware {
private ApplicationContext applicationContext;
public RAPServer() {
super(null, "/");
}
public void init() {
setSessionHandler(new SessionHandler());
setContextPath("/");
setResourceBase(".");
this.addServlet(RWTServlet.class, "/rap");
setClassLoader(Thread.currentThread().getContextClassLoader());
setInitParameter(ApplicationConfiguration.CONFIGURATION_PARAM,
"ApplicationConfiguration");
addEventListener(new RWTServletContextListener());
GenericWebApplicationContext wctx = new GenericWebApplicationContext();
wctx.setParent(this.applicationContext);
wctx.setConfigLocation("");
wctx.setServletContext(getServletContext());
wctx.refresh();
getServletContext().setAttribute(
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
wctx);
}