// 如果为空,跳转回登陆页面
log.error("could not get userid from threadlocal, maybe not config correctly! return login page!");
String template = "<script type='text/javascript'>(window.parent||window).location.replace('%s');</script>";
printMessage(httpResponse, template, loginPagePath);
log.error("could not get userid from threadlocal, maybe not config correctly! return login page!");
String template = "<script type='text/javascript'>(window.parent||window).location.replace('%s');</script>";
printMessage(httpResponse, template, loginPagePath);
return;
private void printMessage(HttpServletResponse httpResponse, String template, Object... args) throws IOException {
PrintWriter writer = httpResponse.getWriter();
writer.write(String.format(template, args));
writer.flush();
writer.close();
}