最近想看tomcat的源代码 就去网上下了tomcat(6.0)的源码 部署启动没有错误后 就尝试在webapp文件夹中放了个简单web工程 Test 用Bootstrap启动tomcat后 能进http://localhost:8080/ 但是想要访问所建工程中的servlet TestServlet就不行了http://localhost:8080/Test/TestServlet 报的是 HTTP Status 404 错误 不知道是不是tomcat没有加载工程 不清楚原因tomcat启动时控制台信息2012-3-23 22:46:43 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\jdk1.6.0_14\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_14\bin2012-3-23 22:46:46 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-3-23 22:46:46 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 4933 ms
2012-3-23 22:46:46 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-3-23 22:46:46 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/@VERSION@
2012-3-23 22:46:46 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor docs.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-3-23 22:46:50 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2012-3-23 22:46:50 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-3-23 22:46:50 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-3-23 22:46:50 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Test
2012-3-23 22:46:50 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-3-23 22:46:51 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-3-23 22:46:51 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/169 config=null
2012-3-23 22:46:51 org.apache.catalina.startup.Catalina start
信息: Server startup in 4824 ms工程web.xml 文件内容
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
信息: 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\jdk1.6.0_14\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_14\bin2012-3-23 22:46:46 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-3-23 22:46:46 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 4933 ms
2012-3-23 22:46:46 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-3-23 22:46:46 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/@VERSION@
2012-3-23 22:46:46 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor docs.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2012-3-23 22:46:49 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-3-23 22:46:50 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2012-3-23 22:46:50 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-3-23 22:46:50 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-3-23 22:46:50 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Test
2012-3-23 22:46:50 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-3-23 22:46:51 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-3-23 22:46:51 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/169 config=null
2012-3-23 22:46:51 org.apache.catalina.startup.Catalina start
信息: Server startup in 4824 ms工程web.xml 文件内容
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
解决方案 »
- 一个index.jsp里,执行这句代码后,我该去哪里找下一步?
- dwr3与s1sh集成
- jsp新手求助!!!
- 支持Ajax和JSF非常灵活的Web UI开发平台
- 我想用批处理删除mysql数据库中的表中的记录.怎么写呀?谢谢大家了.在线等待
- 如何令连接的参数不出现在地址栏?
- 有没有亲有类似于淘宝那种即时通信的程序,给我个网址也行,谢谢
- 验证码问题session出问题了。。。。。。
- 高手啊,快救命:在Tomcat3.0中成功,在Tomcat4.0中出错
- 输出xml文件时显示类转换异常,求大神指点
- 求助连接oracle The Network Adapter could not establish the connection
- javaWeb开发,如何将exe文件制作成activex控件局域网内自动安装
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
嗯 看了下 自动部署是为true 应该不是这个原因