新建dynamic web project ,就创建一个index.jsp 然后点那个绿色三角
跳出对话框报错: Several ports (8081, 8009) required by web1sq at localhost are already in use. The server may already
be running in another process, or a system process may be using the port. To start this server you will need
to stop the other process or change the port number(s).
直接通过网页打开,提示:
HTTP Status 404 - /web1/index.jsp
--------------------------------------------------------------------------------
type Status report
message /web1/index.jsp
description The requested resource (/web1/index.jsp) is not available.
应该是占了端口,也基本肯定是tomcat的原因,大家帮我想下怎么解决,谢谢
Tips:
网页结构是正确的并且有web.xml的,tomcat的8080改成了8081
http://localhost:8081/ tomcat的网页是可以打开的
tomcat安装的时候必须是默认路径 如果改成其他路径(比如d:\mytomcat)是装不上去的,但环境变量肯定是对的
在C:\Program Files\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost下面没有web1这个目录再补充点:
十一月 25, 2012 8:37:04 下午 org.apache.catalina.core.AprLifecycleListener init
INFO: 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\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;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\QuickTime\QTSystem\;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk;C:\Program Files\Android\android-sdk\platform-tools;.;C:\Program Files\Java\jdk1.7.0_07\bin;C:\Program Files\Java\jdk1.7.0_07\jre\bin;C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib;C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\jsp-api.jar;D:\JAVA\eclipse;;.
十一月 25, 2012 8:37:05 下午 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8081"]
十一月 25, 2012 8:37:05 下午 org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-8081"]
java.net.BindException: Address already in use: JVM_Bind <null>:8081
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:384)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:492)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:369)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:909)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781)