use of app.hongs.action.ChoiceHelper in project HongsCORE by ihongs.
the class XsrfFilter method init.
@Override
public void init(FilterConfig fc) throws ServletException {
inside = XsrfFilter.class.getName() + ":" + fc.getFilterName() + ":INSIDE";
ignore = new ChoiceHelper(fc.getInitParameter("ignore-urls"), fc.getInitParameter("attend-urls"));
}
use of app.hongs.action.ChoiceHelper in project HongsCORE by ihongs.
the class SessFilter method init.
@Override
public void init(FilterConfig fc) throws ServletException {
String fn;
fn = fc.getInitParameter("request-attr");
if (fn != null)
SSRA = fn;
fn = fc.getInitParameter("request-name");
if (fn != null)
SSRN = fn;
fn = fc.getInitParameter("cookie-name");
if (fn != null)
SSCN = fn;
fn = fc.getInitParameter("cookie-path");
if (fn != null)
SSCP = fn;
fn = fc.getInitParameter("cookie-max-age");
if (fn != null)
SSCX = Integer.parseInt(fn);
fn = fc.getInitParameter("session-timeout");
if (fn != null)
SSEX = Integer.parseInt(fn);
if (!SSCP.startsWith("/")) {
SSCP = Core.BASE_HREF + "/" + SSCP;
}
inside = SessFilter.class.getName() + ":" + fc.getFilterName() + ":INSIDE";
ignore = new ChoiceHelper(fc.getInitParameter("ignore-urls"), fc.getInitParameter("attend-urls"));
}
use of app.hongs.action.ChoiceHelper in project HongsCORE by ihongs.
the class SparFilter method init.
@Override
public void init(FilterConfig cnf) throws ServletException {
ignore = new ChoiceHelper(cnf.getInitParameter("ignore-urls"), cnf.getInitParameter("attend-urls"));
// 索引文件列表
access = Synt.toSet(cnf.getInitParameter("index-file"));
if (access == null) {
access = getWelcomeFileList();
}
}
use of app.hongs.action.ChoiceHelper in project HongsCORE by ihongs.
the class AuthFilter method init.
@Override
public void init(FilterConfig config) throws ServletException {
super.init(config);
String s;
/**
* 获取登录超时
*/
this.exp = Synt.declare(config.getInitParameter("expire-time"), 0L);
/**
* 获取权限配置名
*/
s = config.getInitParameter("config-name");
if (null != s) {
this.aut = s;
try {
this.siteMap = NaviMap.getInstance(s);
} catch (HongsException ex) {
throw new ServletException(ex);
}
} else {
try {
this.siteMap = NaviMap.getInstance();
} catch (HongsException ex) {
throw new ServletException(ex);
}
}
/**
* 获取首页URL
*/
s = config.getInitParameter("index-page");
if (s != null) {
this.indexPage = Core.BASE_HREF + s;
}
/**
* 获取登录URL
*/
s = config.getInitParameter("login-page");
if (s != null) {
this.loginPage = Core.BASE_HREF + s;
}
/**
* 获取不包含的URL
*/
this.ignore = new ChoiceHelper(config.getInitParameter("ignore-urls"), config.getInitParameter("attend-urls"));
}
use of app.hongs.action.ChoiceHelper in project HongsCORE by ihongs.
the class AutoFilter method init.
@Override
public void init(FilterConfig cnf) throws ServletException {
super.init(cnf);
action = cnf.getInitParameter("action-path");
layout = cnf.getInitParameter("layout-path");
if (action == null) {
action = "/common/auto";
}
if (layout == null) {
layout = action;
}
// 获取不包含的URL
this.ignore = new ChoiceHelper(cnf.getInitParameter("ignore-urls"), cnf.getInitParameter("attend-urls"));
}
Aggregations