users@glassfish.java.net

Re: Static Content in Glassfish

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 Feb 2007 13:46:22 PST

I thought this question was interesting, so I played with it for a while. I found out
that glassfish comes with org.apache.catalina.servlets.DefaultServlet, which can
be configured to run by making the usual edits to your web.xml file. Once deployed,
it will serve static content out of your WAR.

However, it seems to serve almost anything (the META-INF and WEB-INF directories
are excluded) meaning that someone could grab any JSP source right out of there
too.

DefaultServlet doesn't appear to have any way to configure a base directory, which
is unfortunate because if it did it would be exactly what you desire.

http://tomcat.apache.org/tomcat-4.1-doc/catalina/funcspecs/fs-default.html
[Message sent by forum member 'pohl' (pohl)]

http://forums.java.net/jive/thread.jspa?messageID=203683