异常信息:
严重: Exception starting filter nutz
org.nutz.mvc.NutConfigException: java.lang.ClassNotFoundException: com.xiaofangtech.tabletop.main.MainModule
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:135)
at org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:51)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:18)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4660)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5298)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.xiaofangtech.tabletop.main.MainModule
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.nutz.lang.Lang.loadClass(Lang.java:1989)
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
... 16 more
web.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
xftabletopbe
nutz
org.nutz.mvc.NutFilter
modules
com.xiaofangtech.tabletop.main.MainModule
nutz
/*
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
MainModule如下:
package com.xiaofangtech.tabletop.main;
import org.nutz.mvc.annotation.Modules;
@Modules(scanPackage=true)
public class MainModule {
}
工程结构: