Serving static content with jetty 7, using defaultservlet configured from web.xml
- by Chilly
Hi All,
This is jetty 7 and xml configured, not embedded.
I'm trying to serve a static file, crossdomain.xml, to an app that connects to a datasource I run from jetty. To do this, I configured a servlet and its mapping thus:
default
org.eclipse.jetty.servlet.DefaultServlet
resourceBase
/moo/somedirectory
default
/*
Sadly all I get are 404's. Any help would be much appreciated, btw the rest of my web.xm lfile looks like:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
cometd
org.cometd.server.continuation.ContinuationCometdServlet
1
cometd
/cometd/*
default
org.eclipse.jetty.servlet.DefaultServlet
resourceBase
/foo/foo
default
/*
initializer
com.foo.research.Initializer
2
cross-origin
org.eclipse.jetty.servlets.CrossOriginFilter
cross-origin
/cometd/*
</web-app>