NutzCN Logo
问答 nutzbook登陆时出现connection error错误。
发布于 2754天前 作者 morty 1730 次浏览 复制 上一个帖子 下一个帖子
标签:

日志如下:

D:\Tomcat\bin\catalina.bat run
[2017-05-02 02:38:34,891] Artifact nutzbook:war exploded: Server is not connected. Deploy is not available.
Using CATALINA_BASE:   "C:\Users\sll\.IntelliJIdea2017.1\system\tomcat\Unnamed_nutzbook_3"
Using CATALINA_HOME:   "D:\Tomcat"
Using CATALINA_TMPDIR: "D:\Tomcat\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_111"
Using CLASSPATH:       "D:\Tomcat\bin\bootstrap.jar;D:\Tomcat\bin\tomcat-juli.jar"
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.76
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Mar 9 2017 13:49:01 UTC
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.76.0
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jdk1.8.0_111\jre
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_111-b14
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         C:\Users\sll\.IntelliJIdea2017.1\system\tomcat\Unnamed_nutzbook_3
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Tomcat
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=C:\Users\sll\.IntelliJIdea2017.1\system\tomcat\Unnamed_nutzbook_3\conf\logging.properties
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Tomcat\endorsed
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=C:\Users\sll\.IntelliJIdea2017.1\system\tomcat\Unnamed_nutzbook_3
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Tomcat
五月 02, 2017 2:38:38 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=D:\Tomcat\temp
五月 02, 2017 2:38:38 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.
五月 02, 2017 2:38:38 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
五月 02, 2017 2:38:39 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.2k  26 Jan 2017)
五月 02, 2017 2:38:40 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
五月 02, 2017 2:38:40 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
五月 02, 2017 2:38:40 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 3339 ms
五月 02, 2017 2:38:41 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 02, 2017 2:38:41 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.76
五月 02, 2017 2:38:41 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
五月 02, 2017 2:38:41 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
五月 02, 2017 2:38:41 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 538 ms
Connected to server
[2017-05-02 02:38:41,749] Artifact nutzbook:war exploded: Artifact is being deployed, please wait...
五月 02, 2017 2:38:43 下午 org.apache.catalina.deploy.WebXml setVersion
警告: Unknown version string [3.1]. Default version will be used.
五月 02, 2017 2:38:45 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-5-2 14:38:45.639 INFO [RMI TCP Connection(3)-127.0.0.1] Select SystemLog as Nutz.Log implement
2017-5-2 14:38:45.647 INFO [RMI TCP Connection(3)-127.0.0.1] NutFilter[nutz] starting ...
2017-5-2 14:38:45.714 DEBUG [RMI TCP Connection(3)-127.0.0.1] Locations for Scans:
[Dir[path=D:\Tomcat\bin], Jar[path=E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], Jar[path=D:\Tomcat\bin\bootstrap.jar], Jar[path=D:\Tomcat\bin\tomcat-juli.jar]]
2017-5-2 14:38:45.809 DEBUG [RMI TCP Connection(3)-127.0.0.1] Locations for Scans:
{D:\Tomcat\bin=Dir[path=D:\Tomcat\bin], E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], D:\Tomcat\bin\bootstrap.jar=Jar[path=D:\Tomcat\bin\bootstrap.jar], D:\Tomcat\bin\tomcat-juli.jar=Jar[path=D:\Tomcat\bin\tomcat-juli.jar], E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\classes=Dir[path=E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\classes], E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\mysql-connector-java-5.1.38.jar=Jar[path=E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\mysql-connector-java-5.1.38.jar], E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\druid-1.0.19.jar=Jar[path=E:\ideaworkspaces\nutzbook\target\nutzbook\WEB-INF\lib\druid-1.0.19.jar]}
2017-5-2 14:38:45.879 DEBUG [RMI TCP Connection(3)-127.0.0.1] Using 95 castor for Castors
2017-5-2 14:38:45.894 DEBUG [RMI TCP Connection(3)-127.0.0.1] Loading by class org.nutz.mvc.impl.NutLoading
2017-5-2 14:38:45.897 INFO [RMI TCP Connection(3)-127.0.0.1] Nutz Version : 1.r.60 
2017-5-2 14:38:45.897 INFO [RMI TCP Connection(3)-127.0.0.1] Nutz.Mvc[nutz] is initializing ...
2017-5-2 14:38:45.897 DEBUG [RMI TCP Connection(3)-127.0.0.1] Web Container Information:
2017-5-2 14:38:45.901 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - Default Charset : GBK
2017-5-2 14:38:45.902 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - Current . path  : D:\Tomcat\bin\.
2017-5-2 14:38:45.902 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - Java Version    : 1.8.0_111
2017-5-2 14:38:45.902 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - File separator  : \
2017-5-2 14:38:45.902 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - Timezone        : Asia/Shanghai
2017-5-2 14:38:45.903 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - OS              : Windows 10 amd64
2017-5-2 14:38:45.904 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - ServerInfo      : Apache Tomcat/7.0.76
2017-5-2 14:38:45.904 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - Servlet API     : 3.0
2017-5-2 14:38:45.904 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - ContextPath     : 
2017-5-2 14:38:45.904 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - context.tempdir : C:\Users\sll\.IntelliJIdea2017.1\system\tomcat\Unnamed_nutzbook_3\work\Catalina\localhost\_
2017-5-2 14:38:45.905 DEBUG [RMI TCP Connection(3)-127.0.0.1]  - MainModule      : net.sll.nutzbook.MainModule
2017-5-2 14:38:45.906 DEBUG [RMI TCP Connection(3)-127.0.0.1] >> app.root = E:/ideaworkspaces/nutzbook/target/nutzbook
2017-5-2 14:38:45.909 DEBUG [RMI TCP Connection(3)-127.0.0.1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.sll.nutzbook", "*tx", "*async"],init=[])
2017-5-2 14:38:45.935 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-5-2 14:38:45.936 DEBUG [RMI TCP Connection(3)-127.0.0.1] loading ioc js config from [dao.js]
2017-5-2 14:38:45.945 DEBUG [RMI TCP Connection(3)-127.0.0.1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
2017-5-2 14:38:45.950 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found 4 resource by src( net/sll/nutzbook/ ) , regex( ^.+[.]class$ )
2017-5-2 14:38:45.980 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found @IocBean : class net.sll.nutzbook.module.UserModule
2017-5-2 14:38:45.991 INFO [RMI TCP Connection(3)-127.0.0.1] Found 1 classes in 1 base-packages!
beans = ["userModule"]
2017-5-2 14:38:45.993 DEBUG [RMI TCP Connection(3)-127.0.0.1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
2017-5-2 14:38:45.995 DEBUG [RMI TCP Connection(3)-127.0.0.1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
2017-5-2 14:38:45.999 INFO [RMI TCP Connection(3)-127.0.0.1] NutIoc init begin ...
2017-5-2 14:38:46.2 INFO [RMI TCP Connection(3)-127.0.0.1] ... NutIoc init complete
2017-5-2 14:38:46.7 INFO [RMI TCP Connection(3)-127.0.0.1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-5-2 14:38:46.9 DEBUG [RMI TCP Connection(3)-127.0.0.1] @Views(DefaultViewMaker.class)
2017-5-2 14:38:46.18 DEBUG [RMI TCP Connection(3)-127.0.0.1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-5-2 14:38:46.26 DEBUG [RMI TCP Connection(3)-127.0.0.1] module class location 'file:/E:/ideaworkspaces/nutzbook/target/nutzbook/WEB-INF/classes/'
2017-5-2 14:38:46.27 DEBUG [RMI TCP Connection(3)-127.0.0.1]  > scan 'net.sll.nutzbook'
2017-5-2 14:38:46.29 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found 4 resource by src( net/sll/nutzbook/ ) , regex( ^.+[.]class$ )
2017-5-2 14:38:46.30 DEBUG [RMI TCP Connection(3)-127.0.0.1]    >> add 'net.sll.nutzbook.module.UserModule'
2017-5-2 14:38:46.39 INFO [RMI TCP Connection(3)-127.0.0.1] Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
2017-5-2 14:38:46.43 INFO [RMI TCP Connection(3)-127.0.0.1] Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2017-5-2 14:38:46.54 DEBUG [RMI TCP Connection(3)-127.0.0.1]    '/user/count'               >> (UserModule.java:30).count            : int        | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-5-2 14:38:46.63 DEBUG [RMI TCP Connection(3)-127.0.0.1]    '/user/logout'              >> (UserModule.java:49).logout           : void       | @Ok(>>:/ ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-5-2 14:38:46.67 DEBUG [RMI TCP Connection(3)-127.0.0.1]    '/user/login'               >> (UserModule.java:35).login            : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-5-2 14:38:46.67 INFO [RMI TCP Connection(3)-127.0.0.1] Found 3 module methods
2017-5-2 14:38:46.68 DEBUG [RMI TCP Connection(3)-127.0.0.1] @Localization not define
2017-5-2 14:38:46.69 INFO [RMI TCP Connection(3)-127.0.0.1] Setup application...
2017-5-2 14:38:46.83 DEBUG [RMI TCP Connection(3)-127.0.0.1] Get 'dao'<interface org.nutz.dao.Dao>
2017-5-2 14:38:46.85 DEBUG [RMI TCP Connection(3)-127.0.0.1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-5-2 14:38:46.89 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Load definition name=$aop_async
2017-5-2 14:38:46.93 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found IocObject($aop_async) in AsyncAopIocLoader@2002400017
2017-5-2 14:38:46.94 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-5-2 14:38:46.95 DEBUG [RMI TCP Connection(3)-127.0.0.1] Save object '$aop_async' to [app] 
2017-5-2 14:38:46.103 DEBUG [RMI TCP Connection(3)-127.0.0.1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-5-2 14:38:46.103 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Load definition name=dao
2017-5-2 14:38:46.104 DEBUG [RMI TCP Connection(3)-127.0.0.1] Loading define for name=dao
2017-5-2 14:38:46.107 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-5-2 14:38:46.108 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2017-5-2 14:38:46.123 DEBUG [RMI TCP Connection(3)-127.0.0.1] Load class org.nutz.dao.impl.NutDao without AOP
2017-5-2 14:38:46.123 DEBUG [RMI TCP Connection(3)-127.0.0.1] Save object 'dao' to [app] 
2017-5-2 14:38:46.124 DEBUG [RMI TCP Connection(3)-127.0.0.1] Get 'dataSource'<>
2017-5-2 14:38:46.124 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Load definition name=dataSource
2017-5-2 14:38:46.124 DEBUG [RMI TCP Connection(3)-127.0.0.1] Loading define for name=dataSource
2017-5-2 14:38:46.131 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-5-2 14:38:46.131 DEBUG [RMI TCP Connection(3)-127.0.0.1] 	 >> Make...'dataSource'<>
2017-5-2 14:38:46.149 DEBUG [RMI TCP Connection(3)-127.0.0.1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-5-2 14:38:46.149 DEBUG [RMI TCP Connection(3)-127.0.0.1] Save object 'dataSource' to [app] 
五月 02, 2017 2:38:46 下午 com.alibaba.druid.pool.DruidDataSource info
2017-5-2 14:38:46.212 DEBUG [RMI TCP Connection(3)-127.0.0.1] Get 'dataSource'<>
信息: {dataSource-1} inited
2017-5-2 14:38:46.248 INFO [RMI TCP Connection(3)-127.0.0.1] Init file-pool by: C:\Users\sll/.nutz/tmp/dao/ [200000]
2017-5-2 14:38:46.249 DEBUG [RMI TCP Connection(3)-127.0.0.1] file-pool.home: 'C:\Users\sll\.nutz\tmp\dao'
2017-5-2 14:38:46.250 INFO [RMI TCP Connection(3)-127.0.0.1] file-pool.cursor: 0
2017-5-2 14:38:46.259 DEBUG [RMI TCP Connection(3)-127.0.0.1] Jdbcs init complete
2017-5-2 14:38:46.259 INFO [RMI TCP Connection(3)-127.0.0.1] Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
Tue May 02 14:38:46 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2017-5-2 14:38:47.18 DEBUG [RMI TCP Connection(3)-127.0.0.1] select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
2017-5-2 14:38:47.38 DEBUG [RMI TCP Connection(3)-127.0.0.1] JDBC Driver --> mysql-connector-java-5.1.38 ( Revision: fe541c166cec739c74cc727c5da96c1028b4834a )
2017-5-2 14:38:47.39 DEBUG [RMI TCP Connection(3)-127.0.0.1] JDBC Name   --> MySQL Connector Java
2017-5-2 14:38:47.40 DEBUG [RMI TCP Connection(3)-127.0.0.1] JDBC URL    --> jdbc:mysql://127.0.0.1:3306/nutzbook
2017-5-2 14:38:47.81 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_client=utf8
2017-5-2 14:38:47.82 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_connection=utf8
2017-5-2 14:38:47.82 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_database=utf8
2017-5-2 14:38:47.83 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_filesystem=binary
2017-5-2 14:38:47.84 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_results=
2017-5-2 14:38:47.85 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_server=utf8
2017-5-2 14:38:47.85 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_set_system=utf8
2017-5-2 14:38:47.86 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : character_sets_dir=C:\Program Files\MySQL\MySQL Server 5.7\share\charsets\
2017-5-2 14:38:47.93 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : binlog_format=ROW
2017-5-2 14:38:47.95 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : database=nutzbook
2017-5-2 14:38:47.97 DEBUG [RMI TCP Connection(3)-127.0.0.1] Mysql : user=root@localhost
2017-5-2 14:38:47.163 DEBUG [RMI TCP Connection(3)-127.0.0.1] Database info --> MYSQL:[MySQL - 5.7.17-log]
2017-5-2 14:38:47.193 DEBUG [RMI TCP Connection(3)-127.0.0.1] Found 4 resource by src( net/sll/nutzbook/ ) , regex( ^.+[.]class$ )
2017-5-2 14:38:47.392 DEBUG [RMI TCP Connection(3)-127.0.0.1] SELECT COUNT(*) FROM t_user 
2017-5-2 14:38:47.444 INFO [RMI TCP Connection(3)-127.0.0.1] Nutz.Mvc[nutz] is up in 1537ms
[2017-05-02 02:38:47,554] Artifact nutzbook:war exploded: Artifact is deployed successfully
[2017-05-02 02:38:47,554] Artifact nutzbook:war exploded: Deploy took 5,805 milliseconds
五月 02, 2017 2:38:51 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\webapps\manager
五月 02, 2017 2:38:51 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\webapps\manager has finished in 159 ms
2017-5-2 14:38:53.690 DEBUG [http-apr-8080-exec-4] Search mapping for [POST] path=/${base}/user/login : NOT Action match
2017-5-2 14:43:23.416 DEBUG [http-apr-8080-exec-2] Search mapping for [POST] path=/${base}/user/login : NOT Action match

11 回复

对的,用的就是您给的jsp代码。如下:

<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>NutzBook demo</title>
    <!-- 导入jquery -->
    <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js"></script>
    <!-- 把user id复制到一个js变量 -->
    <script type="text/javascript">
        var me = '<%=session.getAttribute("me") %>';
        var base = '${base}';
        $(function() {
            $("#login_button").click(function() {
                $.ajax({
                    url : base + "/user/login",
                    type: "POST",
                    data:$('#loginForm').serialize(),
                    error: function(request) {
                        alert("Connection error");
                    },
                    dataType:"json",
                    success: function(data) {
                        alert(data);
                        if (data == true) {
                            alert("登陆成功");
                            location.reload();
                        } else {
                            alert("登陆失败,请检查账号密码")
                        }
                    }
                });
                return false;
            });
            if (me != "null") {
                $("#login_div").hide();
                $("#userInfo").html("您的Id是" + me);
                $("#user_info_div").show();
            } else {
                $("#login_div").show();
                $("#user_info_div").hide();
            }
        });
    </script>
</head>
<body>
<div id="login_div">
    <form action="#" id="loginForm" method="post">
        用户名 <input name="username" type="text" value="admin">
        密码 <input name="password" type="password" value="123456">
        <button id="login_button">提交</button>
    </form>
</div>
<div id="user_info_div">
    <p id="userInfo"></p>
    <a href="${base}/user/logout">登出</a>
</div>
</body>
</html>

web.xml贴一下

web.xml如下:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app  xmlns="http://xmlns.jcp.org/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
          version="3.1">
  <display-name>nutzbook</display-name>
  <filter>
    <filter-name>nutz</filter-name>
    <filter-class>org.nutz.mvc.NutFilter</filter-class>
    <init-param>
      <param-name>modules</param-name>
      <param-value>net.sll.nutzbook.MainModule</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>nutz</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
  </filter-mapping>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>

删掉这个

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

it works。谢谢!

我也是这个问题 但是在xml里没有这行代码啊

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

@qq_ebd02e3e 后台有查询user表的日志没?

@wendal 解决了 fitter删掉就好了

fitter 是什么???

Filters 打错 尴尬。。。

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