2 sungaochao sungaochao 于 2016.03.23 22:34 提问

为什么不能运行,第一次写servlet

写了一个类,然后用这个运行,为什么没反应
<?xml version="1.0" encoding="UTF-8"?>

<!-- 配置和映射Servlet -->

HelloSverlet
com.atguigu.java1.HelloSverlet


HelloSverlet
/hello

控制台输出的信息是这样的:
三月 23, 2016 10:31:53 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:day01' did not find a matching property.
三月 23, 2016 10:31:53 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HTML01' did not find a matching property.
三月 23, 2016 10:31:53 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Servlet01' did not find a matching property.
三月 23, 2016 10:31:53 下午 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_65\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_65/bin/server;C:/Program Files/Java/jre1.8.0_65/bin;C:/Program Files/Java/jre1.8.0_65/lib/amd64;C:\ProgramData\Oracle\Java\javapath;D:\oracle\product\11.2.0\client_1\bin;D:\oracle\product\11.2.0\dbhome_1\bin;D:\oracle\product\10.2.0\client_1\bin;D:\oracle\product\10.2.0\db_1\bin;C:\app\acerpc\product\12.1.0\dbhome_1\bin;D:\Oracle\product\12.1.0\dbhome_1\bin;c:\gtk\bin;D:\JDK\bin;C:\Program Files\Java\jdk1.8.0_40\bin;C:\Program Files\Java\jdk1.8.0_40\jre\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\软件2\Eclipse\eclipse;;.
三月 23, 2016 10:31:53 下午 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8989
三月 23, 2016 10:31:53 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1250 ms
三月 23, 2016 10:31:53 下午 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
三月 23, 2016 10:31:53 下午 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
三月 23, 2016 10:31:55 下午 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8989
三月 23, 2016 10:31:55 下午 org.apache.jk.common.ChannelSocket init
信息: Port busy 8989 java.net.BindException: Address already in use: JVM_Bind
三月 23, 2016 10:31:55 下午 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8990
三月 23, 2016 10:31:55 下午 org.apache.jk.server.JkMain start
信息: Jk running ID=1 time=0/78 config=null
三月 23, 2016 10:31:55 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1571 ms

1个回答

zfy1355
zfy1355   2016.03.23 23:06

看日志,应该是配置环境出问题了,你把编译好的码放到tomcat下运行试试,不要用eclipse的容器

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!