Hello all! In very simple (maybe simplest as its just ResourceHandler) scenario to serve static plain HTML files I'm facing NPE with jetty-8.1.8.v20121106.
Very basic $JETTY_HOME/my-context.xml: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" " http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/my-context</Set> <Set name="resourceBase">/home/libor/Ubuntu One/SYSA/nice-error-pages/</Set> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="welcomeFiles"> <Array type="String"> <Item>index.html</Item> </Array> </Set> <Set name="cacheControl">max-age=3600,public</Set> </New> </Set> </Configure> Produces HTTP 500 Internal Server error with the following details from log file: 2013-01-25 10:05:03.811:WARN:oejs.AbstractHttpConnection:/nice404/ java.lang.NullPointerException at org.eclipse.jetty.server.handler.ResourceHandler.handle(ResourceHandler.java:403) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1074) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) NPE is caused by something in <Set name="handler"> block because removing or commenting it out prevents crash. What's wrong? Thanks for any suggestions. -- Hezky den / Have a nice day Libor JELÍNEK VIRTAGE SOFTWARE // software - design - web Lucni 542 // 285 04 Uhlirske Janovice // Czech Republic support: +420 315 555 488 // cell: +420 777 205 142 email/jabber: [email protected] // web: www.virtage.com Visit our developer adventures at http://devblog.virtage.com!
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
