Serving static content with jetty 7, using defaultservlet configured from web.xml
Posted
by Chilly
on Stack Overflow
See other posts from Stack Overflow
or by Chilly
Published on 2010-05-20T16:48:11Z
Indexed on
2010/05/20
16:50 UTC
Read the original article
Hit count: 944
jetty
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>
© Stack Overflow or respective owner