我直接放到WebContent下面是可以访问的
但是如果放到WEB-INF下面访问不了?应该如何访问呢?
9 回复
我在UserModule中增加了如下的方法,还是不行啊
@Ok("jsp:index") //指向 /WEB-INF/index.jsp
@At("/")
public void index(){}
我加了如上的方法之后,我访问的地址怎么写啊?这样写吗?
http://127.0.0.1:8080/nutzbook/index
查日志是因为Filters设置为login后才能访问,先登陆,再访问就好了。
Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2017-05-16 23:40:04,614 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/' >> (UserModule.java:62).index : void | @Ok(jsp:jsp.user.list) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,628 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/add' >> (UserModule.java:66).add : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,629 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/count' >> (UserModule.java:38).count : int | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,630 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/update' >> (UserModule.java:77).update : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,634 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/delete' >> (UserModule.java:91).delete : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,637 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/query' >> (UserModule.java:100).query : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,638 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/login' >> (UserModule.java:44).login : Object | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,640 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG - '/user/logout' >> (UserModule.java:56).logout : void | @Ok(>>:/ ) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-05-16 23:40:04,640 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:220) INFO - Found 8 module methods
添加回复
请先登陆