This commit is contained in:
@@ -134,7 +134,7 @@
|
|||||||
<servlets prefix="/pipes" autoload="true" includes="" excludes="">
|
<servlets prefix="/pipes" autoload="true" includes="" excludes="">
|
||||||
<!--
|
<!--
|
||||||
当Server为HTTP、HTTPS协议时,ResourceServlet才有效. 默认存在一个有默认属性的resource-servlet节点
|
当Server为HTTP、HTTPS协议时,ResourceServlet才有效. 默认存在一个有默认属性的resource-servlet节点
|
||||||
webroot: web资源的根目录, 默认取server节点中的root值
|
webroot: web资源的根目录, 多个目录用;分隔,请求页面url时,如果第一个目录不存在则会查询下一个目录是否存在该文件至到所有目录集合, 默认取server节点中的root值
|
||||||
-->
|
-->
|
||||||
<resource-servlet webroot="root">
|
<resource-servlet webroot="root">
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public final class HttpResourceServlet extends HttpServlet {
|
|||||||
public void init(Context context, AnyValue config) {
|
public void init(Context context, AnyValue config) {
|
||||||
String[] rootstrs = null;
|
String[] rootstrs = null;
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
rootstrs = config.getValue("webroot", "root").trim().split(",");
|
rootstrs = config.getValue("webroot", "root").trim().split(";");
|
||||||
for (int i = 0; i < rootstrs.length; i++) {
|
for (int i = 0; i < rootstrs.length; i++) {
|
||||||
String rootstr = rootstrs[i];
|
String rootstr = rootstrs[i];
|
||||||
if (rootstr.indexOf(':') < 0 && rootstr.indexOf('/') != 0 && System.getProperty("APP_HOME") != null) {
|
if (rootstr.indexOf(':') < 0 && rootstr.indexOf('/') != 0 && System.getProperty("APP_HOME") != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user