NutzCN Logo
问答 关于nutz集成jetbrick-template的问题 找不到模板
发布于 2981天前 作者 lusparioTT 2283 次浏览 复制 上一个帖子 下一个帖子
标签:
module里面的两个方法,第一个正常访问,第二个报jetbrick.io.resource.ResourceNotFoundException: uikit.index模板找不到
@At
@Ok("jetx:hello.jetx")
public void hello(HttpServletRequest request){
    LOG.debug("hello Jetbrick...");
}

@At
@Ok("jetx:uikit.index")
public void uikit(HttpServletRequest request){
}
资源路径是这样的:
WEB-INF
    -template
       -jetx
         -hello.jetx
         -uikit
          -index.jetx        
配置文件:

jetx.template.loaders = $loader
$loader = jetbrick.template.loader.ServletResourceLoader
$loader.root = /WEB-INF/template/jetx/
$loader.reloadable = true

5 回复

试试uikit/index

@wendal 还是不行 但是这样可以action里我这样写
@At
@Ok("jetx:/WEB-INF/template/jetx/hello.jetx")
public void hello(HttpServletRequest request){
LOG.debug("hello Jetbrick...");
}

@At
@Ok("jetx:/WEB-INF/template/jetx/uikit/index.jetx")
public void uikit(HttpServletRequest request){

    LOG.debug("协议(HTTP)信息:" + request.getProtocol());

}

资源路径配置成这样
$loader.root = /WEB-INF/template/jetx/
就都可以访问了

刚发错了 资源路径这样$loader.root = /

看来是不会自己加后缀, 那就是 uikit/index.jetx 咯

添加回复
请先登陆
回到顶部