JFinal项目中获取根目录
config类中定义方法:
@Override
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("base_path"));
}
然后在页面head标签中中添加:
<base href="${base_path}/" />
这样项目中的资源文件引用就不会出问题了
config类中定义方法:
@Override
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("base_path"));
}
然后在页面head标签中中添加:
<base href="${base_path}/" />
这样项目中的资源文件引用就不会出问题了
原来你就是Codemonkey。。。
是的 哈哈