NutzCN Logo
问答 nutzbook启动完毕后找不到index页面报错
发布于 2002天前 作者 ftqiao 2148 次浏览 复制 上一个帖子 下一个帖子
标签:

webapp下有index页面,可以访问到登录页,根据文档将index放置到user下并更改名字为login.jsp,删掉原index.jsp,启动后,日志没有问题,页面会提示

Directory: /nutzbook/
META-INF/ 	0 bytes 	2019-1-18 16:35:54
WEB-INF/ 	0 bytes 	2019-1-18 16:36:28
8 回复

jetty? tomcat? 版本多少? 放个空的index.html试试

jetty, 9.4.9; webapp下放空的index.jsp后,错误信息如下

Directory: /nutzbook/
META-INF/ 	0 bytes 	2019-1-18 16:35:54
WEB-INF/ 	0 bytes 	2019-1-18 16:54:49
index.jsp 	146 bytes 	2019-1-18 16:54:49

空页面

Directory: /nutzbook/
META-INF/ 	0 bytes 	2019-1-18 16:35:54
WEB-INF/ 	0 bytes 	2019-1-18 16:54:49
index.jsp 	0 bytes 	2019-1-18 16:55:59

放个空的index.html

额~放了个空的index.html后,页面空白,后台日志

[2019-01-18 04:58:54,362] Artifact nutzbook:war exploded: Artifact is deployed successfully
[2019-01-18 04:58:54,362] Artifact nutzbook:war exploded: Deploy took 4,604 milliseconds
2019-01-18 16:58:54,882 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/ : NOT Action match
2019-01-18 16:58:54,885 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/index : NOT Action match
2019-01-18 16:58:55,098 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/ : NOT Action match
2019-01-18 16:58:55,100 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/index : NOT Action match
2019-01-18 16:59:00,003 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'cleanNonActiveUserJob'<class net.wendal.nutzbook.quartz.job.CleanNonActiveUserJob>
2019-01-18 16:59:00,003 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=cleanNonActiveUserJob
2019-01-18 16:59:00,003 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(cleanNonActiveUserJob) in AnnotationIocLoader(packages=[net.wendal.nutzbook])
2019-01-18 16:59:00,003 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'cleanNonActiveUserJob'<class net.wendal.nutzbook.quartz.job.CleanNonActiveUserJob>
2019-01-18 16:59:00,004 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object 'cleanNonActiveUserJob' to [app] 
2019-01-18 16:59:00,004 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) DEBUG - Load class net.wendal.nutzbook.quartz.job.CleanNonActiveUserJob without AOP
2019-01-18 16:59:00,007 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2019-01-18 16:59:00,008 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:291) DEBUG - batch acquisition of 0 triggers

额, 做到哪一步了? /nutzbook/user/count 应该ok吧

额~这次问问题没有交代背景!我的锅~
做到“用shiro做登录”这一步了。刚才群里反馈了下Filter顺序不对启动报错的问题。然后才调整的页面。
试了几个url,下面是日志

2019-01-18 17:05:04,631 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [ GET]URI=/nutzbook/user 140ms
2019-01-18 17:05:04,633 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/ : NOT Action match
2019-01-18 17:05:04,634 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/index : NOT Action match
2019-01-18 17:05:25,189 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:291) DEBUG - batch acquisition of 0 triggers
2019-01-18 17:05:37,202 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/user/count : UserModule.count(UserModule.java:44)
2019-01-18 17:05:37,202 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'userModule'<class net.wendal.nutzbook.module.UserModule>
2019-01-18 17:05:37,203 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [ GET]URI=/nutzbook/user/count 1ms
2019-01-18 17:05:48,580 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:291) DEBUG - batch acquisition of 0 triggers
2019-01-18 17:05:52,264 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/user/count : UserModule.count(UserModule.java:44)
2019-01-18 17:05:52,264 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'userModule'<class net.wendal.nutzbook.module.UserModule>
2019-01-18 17:05:52,265 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [ GET]URI=/nutzbook/user/count 1ms
2019-01-18 17:05:52,268 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/ : NOT Action match
2019-01-18 17:05:52,270 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/index : NOT Action match
2019-01-18 17:06:16,413 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:291) DEBUG - batch acquisition of 0 triggers
2019-01-18 17:06:27,920 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/login : NOT Action match

访问一下 /nutzbook/user/ 应该可以的

2019-01-18 17:07:43,748 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [ GET]URI=/nutzbook/user 1ms
2019-01-18 17:07:43,751 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/ : NOT Action match
2019-01-18 17:07:43,752 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:110) DEBUG - Search mapping for [GET] path=/index : NOT Action match
2019-01-18 17:07:51,799 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/user : UserModule.index(UserModule.java:78)
2019-01-18 17:07:51,799 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'userModule'<class net.wendal.nutzbook.module.UserModule>
2019-01-18 17:07:51,800 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [ GET]URI=/nutzbook/user 1ms

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