-
25 Nov 2009 12:40 AM #1
directjngine not run in context /
directjngine not run in context /
I use directjngine1.1,when i start jetty web app in context '/',
private static void startJettyServer() {
Server server = new Server();
SocketConnector connector = new SocketConnector();
connector.setMaxIdleTime(1000 * 60 * 60);
connector.setSoLingerTime(-1);
connector.setPort(8090);
server.setConnectors(new Connector[]{connector});
WebAppContext appContext = new WebAppContext();
appContext.setServer(server);
appContext.setContextPath("/");
appContext.setWar("WebContent/");
server.addHandler(appContext);
try {
server.start();
while (System.in.available() == 0) {
Thread.sleep(5000);
}
server.stop();
server.join();
} catch (Exception e) {
System.exit(100);
}
}
access url:http://localhost:8090/extjs/examples/direct/direct.jsp,show
Successful call to TestAction.doEcho with response:
nullCall to TestAction.multiply failed with message:
Unable to connect to the server.
when i change to appContext.setContextPath("/s"),and access url http://localhost:8090/s/extjs/exampl.../direct.jsp,it ok.
-
27 Nov 2009 8:26 AM #2
Thanks for reporting this.
Yes, this is a bug, and I already fixed it: the new version of DJN I publish will include the fix.
The problem appears only when you set the servlet context name to "" or "/". The only workaround is not to use "" or "/" as the servlet context name.
I think you will probably be able to live with the workaround -for the time being.
Best regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
27 Nov 2009 8:29 AM #3
BTW: could you please post new DirectJNgine related entries in the "Ext Direct Java based implementation" thread?
I would like DJN-related things to be grouped in the same thread, if only to make easier to others to find the information.
ThanksPedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
27 Nov 2009 6:43 PM #4


Reply With Quote