首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

弄JSP成功,弄servlet失败了解决办法

2012-02-17 
弄JSP成功,弄servlet失败了我的是eclipse+tomcat+myeclipse上次好不容易弄JSP成功了改了8080端口为9080成

弄JSP成功,弄servlet失败了
我的是eclipse+tomcat+myeclipse     上次好不容易弄JSP成功了   改了8080端口为9080   成功了       可是现在弄servlet却还是失败....我就新建了个servlet文件,什么都没做     直接点run   可却弹出一大堆错误...我看书说好象要开启什么servlet调用器   把那个注释去掉       可昨天去掉注释后     今天连tomcat主页都打开不了了     又注释掉那个   就可以开主页了

以下为eclipse调试servlet的错误     希望高手指点一下
2007-3-26   19:21:42   org.apache.catalina.core.AprLifecycleListener   init
信息:   The   Apache   Tomcat   Native   library   which   allows   optimal   performance   in   production   environments   was   not   found   on   the   java.library.path:   E:\tomcat\jdk\bin;E:\tomcat\tomcat\Tomcat   6.0\bin
2007-3-26   19:21:42   org.apache.coyote.http11.Http11Protocol   init
严重:   Error   initializing   endpoint
java.net.BindException:   Address   already   in   use:   JVM_Bind:9080
at   org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:499)
at   org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:175)
at   org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
at   org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at   org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at   org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at   org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2007-3-26   19:21:42   org.apache.catalina.startup.Catalina   load
严重:   Catalina.start
LifecycleException:     Protocol   handler   initialization   failed:   java.net.BindException:   Address   already   in   use:   JVM_Bind:9080
at   org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
at   org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at   org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at   org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at   org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2007-3-26   19:21:42   org.apache.catalina.startup.Catalina   load
信息:   Initialization   processed   in   735   ms
2007-3-26   19:21:42   org.apache.catalina.core.StandardService   start
信息:   Starting   service   Catalina
2007-3-26   19:21:42   org.apache.catalina.core.StandardEngine   start
信息:   Starting   Servlet   Engine:   Apache   Tomcat/6.0.10
2007-3-26   19:21:43   org.apache.catalina.core.ApplicationContext   log


信息:   ContextListener:   contextInitialized()
2007-3-26   19:21:43   org.apache.catalina.core.ApplicationContext   log
信息:   SessionListener:   contextInitialized()
2007-3-26   19:21:44   org.apache.coyote.http11.Http11Protocol   start
严重:   Error   starting   endpoint
java.net.BindException:   Address   already   in   use:   JVM_Bind:9080
at   org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:499)
at   org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:513)
at   org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:202)
at   org.apache.catalina.connector.Connector.start(Connector.java:1132)
at   org.apache.catalina.core.StandardService.start(StandardService.java:457)
at   org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at   org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-3-26   19:21:44   org.apache.catalina.startup.Catalina   start
严重:   Catalina.start:  
LifecycleException:     service.getName():   "Catalina ";     Protocol   handler   start   failed:   java.net.BindException:   Address   already   in   use:   JVM_Bind:9080
at   org.apache.catalina.connector.Connector.start(Connector.java:1139)
at   org.apache.catalina.core.StandardService.start(StandardService.java:457)
at   org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at   org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-3-26   19:21:44   org.apache.catalina.startup.Catalina   start
信息:   Server   startup   in   1485   ms
2007-3-26   19:21:44   org.apache.catalina.core.StandardServer   await
严重:   StandardServer.await:   create[9005]:  
java.net.BindException:   Address   already   in   use:   JVM_Bind
at   java.net.PlainSocketImpl.socketBind(Native   Method)
at   java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at   java.net.ServerSocket.bind(ServerSocket.java:319)
at   java.net.ServerSocket. <init> (ServerSocket.java:185)
at   org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at   org.apache.catalina.startup.Catalina.await(Catalina.java:616)
at   org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

[解决办法]
java.net.BindException: Address already in use: JVM_Bind:9080

端口被占用啊!

[解决办法]
我以前也有过类似的问题不过是JSP不好使
给你借鉴一下也可能不管用

eclipse3.2版 myeclipse5.0版 tomcat5.0版

eclipse3.2.2版 myeclipse5.1版 tomcat5.5版

必需是相对应的版本

[解决办法]
E:\jdk\hehe 这个是刚才那个servlet的路径 Servlet的怎么能放这里,你自己到网上去查查把,
[解决办法]
classpath没加上.
[解决办法]
上面的错误是因为重复启用tomcat造成的对同一端口占用
启动一次就可以了
[解决办法]
你先将eclipse 上的带叉的小猫点一下,然后在myeclipse severs 重新启动一下,就OK!

热点排行