defined a scheme to put image/script/stylesheet files side-by-side with view scripts.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6410 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-12-24 22:47:19 +00:00
1 parent 3a3dfc82be
commit e551409a05
3 files changed
+42 -10

No files matched your search

+5 -2
View File
@@ -157,12 +157,15 @@ public class WebAppMain implements ServletContextListener {
if(ver==null) ver="?";
Hudson.VERSION = ver;
context.setAttribute("version",ver);
String verHash = Util.getDigestOf(ver).substring(0, 8);
if(ver.equals("?"))
Hudson.RESOURCE_PATH = "";
else
Hudson.RESOURCE_PATH = "/static/"+Util.getDigestOf(ver).substring(0,8);
}
Hudson.RESOURCE_PATH = "/static/"+verHash;
Hudson.VIEW_RESOURCE_PATH = "/resources/"+ verHash;
}
/**
* Installs log handler to monitor all Hudson logs.