* Jetty: Fix eepsite and webapp cache control directives.

Eepsite fix for new installs only.
  Fix i2psnark BasicServlet javadoc about param prefix.
  (ticket #1128)
This commit is contained in:
zzz
2013-11-15 18:51:14 +00:00
parent 3aa33378c1
commit 96cf1d60c2
3 changed files with 4 additions and 5 deletions

View File

@ -67,9 +67,8 @@ import net.i2p.util.SystemVersion;
* The default servlet. * The default servlet.
* This servlet, normally mapped to /, provides the handling for static * This servlet, normally mapped to /, provides the handling for static
* content, OPTION and TRACE methods for the context. * content, OPTION and TRACE methods for the context.
* The following initParameters are supported, these can be set either * The following initParameters are supported, these can be set
* on the servlet itself or as ServletContext initParameters with a prefix * on the servlet itself:
* of org.mortbay.jetty.servlet.Default. :
* <PRE> * <PRE>
* *
* resourceBase Set to replace the context resource base * resourceBase Set to replace the context resource base

View File

@ -41,7 +41,7 @@ public class WebAppStarter {
static { static {
//_log = ContextHelper.getContext(null).logManager().getLog(WebAppStarter.class); ; //_log = ContextHelper.getContext(null).logManager().getLog(WebAppStarter.class); ;
// see DefaultServlet javadocs // see DefaultServlet javadocs
String pfx = "org.mortbay.jetty.servlet.Default."; String pfx = "org.eclipse.jetty.servlet.Default.";
INIT_PARAMS.put(pfx + "cacheControl", "max-age=86400"); INIT_PARAMS.put(pfx + "cacheControl", "max-age=86400");
INIT_PARAMS.put(pfx + "dirAllowed", "false"); INIT_PARAMS.put(pfx + "dirAllowed", "false");
} }

View File

@ -12,7 +12,7 @@ to serve static html files and images.
<Set name="contextPath">/</Set> <Set name="contextPath">/</Set>
<Set name="resourceBase">./eepsite/docroot/</Set> <Set name="resourceBase">./eepsite/docroot/</Set>
<Call name="setInitParameter"> <Call name="setInitParameter">
<Arg>cacheControl</Arg> <Arg>org.eclipse.jetty.servlet.Default.cacheControl</Arg>
<Arg>max-age=3600,public</Arg> <Arg>max-age=3600,public</Arg>
</Call> </Call>
<Call name="setMimeTypes"> <Call name="setMimeTypes">