Deploy rwt standalone not work [message #1719368] |
Thu, 07 January 2016 13:55 |
excellion fdfds Messages: 14 Registered: July 2012 |
Junior Member |
|
|
Hello, i create a RWT standalone (as servlet) in projet java with this tuto :
http://www.eclipse.org/rap/developers-guide/devguide.php?topic=rwt-standalone.html&version=3.0
If i launch with web.xml, it works.
Now, i want to deploy this app in embedded jetty server with spring.
if i deploy the rwt servlet, ApplicationConfiguration is reading (title of tab is correct) but the page is blank.
Jetty code to launch RWT Servlet :
public static void main(String[] args) throws Exception
{
new EmbeddedJetty().startJetty(getPortFromArgs(args));
}
private void startJetty(int port) throws Exception
{
logger.debug("Starting server at port {}", port);
Server server = new Server(port);
// lacement bis de rap
WebAppContext appRap = new WebAppContext();
appRap.setContextPath("/");
appRap.setResourceBase(".");
appRap.setDefaultsDescriptor("src/main/java/test/rap/WEB-INF/web.xml");
server.setHandler(appRap);
server.start();
logger.info("Server started at port {}", port);
server.join();
}
AppConfiguration :
public class AppConfiguration implements ApplicationConfiguration
{
public void configure(Application application)
{
Map<String, String> properties = new HashMap<String, String>();
properties.put( WebClient.PAGE_TITLE, "Hello world rap" );
application.addEntryPoint("/rap", HelloWorld.class, properties);
}
}
public class HelloWorld extends AbstractEntryPoint
{
/**
*
*/
private static final long serialVersionUID = 1L;
public void createContents(Composite parent)
{
Label label = new Label(parent, SWT.NONE);
label.setText("Hello RAP World");
}
}
Anyone has ideas? Or example of rwt standalone application deployed in embedded jetty server ?
I attach my project. Launch EmbeddyJetty as application java.
[Updated on: Thu, 07 January 2016 14:04] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03931 seconds