java web应用中组件添加了filter之后,显示:Firefox 无法建立到 localhost:8080 服务器的连接。

发布于 2021-11-27 18:20:54 字数 0 浏览 1013 评论 10

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

清欢 2021-11-28 12:11:11

= =小菜鸟一枚。还在看教程学习中,出了问题完全摸不到头脑。。。

檐上三寸雪 2021-11-28 12:11:01

好新的新人

爱的故事 2021-11-28 12:10:59

引用来自“itwarcraft”的评论

1、检查服务器启动的时候的后台日志,确认启动正常与端口正确
2、先使用FireFox连接服务器,如果不正确,将url-pattern中的内容改成如*.do,再重启服务器,使用Firefox连接服务器,看看是否正常,如果正常,则是filter中的内容异常。

我感觉,一般是你的服务器没有正常启动。应该是filter中发生异常了吧。
如果是filter异常,可以贴一下filter的代码。

初见你 2021-11-28 12:10:33

引用来自“char1st”的评论

Filter mapping specifies an unknown filter name LoginFiler

百思不得你姐 2021-11-28 12:10:10

Filter mapping specifies an unknown filter name LoginFiler

哑剧 2021-11-28 11:47:25

重启电脑2333

英雄似剑 2021-11-28 11:43:02

这是服务器启动时的后台日志,菜鸟刚学,很多地方都不懂,请大神帮着看看应该怎么办

风苍溪 2021-11-28 11:15:37

八月 29, 2014 2:47:41 下午 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: D:myeclipse2014binarycom.sun.java.jdk7.win32.x86_64_1.7.0.u45bin;D:apache-tomcat-8.0.9bin

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-nio-8080"]

八月 29, 2014 2:47:42 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

信息: Using a shared selector for servlet write/read

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["ajp-nio-8009"]

八月 29, 2014 2:47:42 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

信息: Using a shared selector for servlet write/read

八月 29, 2014 2:47:42 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 894 ms

八月 29, 2014 2:47:42 下午 org.apache.catalina.core.StandardService startInternal

信息: Starting service Catalina

八月 29, 2014 2:47:42 下午 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/8.0.9

八月 29, 2014 2:47:42 下午 org.apache.catalina.core.ContainerBase startInternal

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ServletTest]]

 at java.util.concurrent.FutureTask.report(FutureTask.java:122)

 at java.util.concurrent.FutureTask.get(FutureTask.java:188)

 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)

 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)

 at java.util.concurrent.FutureTask.run(FutureTask.java:262)

 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

 at java.lang.Thread.run(Thread.java:744)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ServletTest]]

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

 ... 6 more

Caused by: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name LoginFiler

 at org.apache.catalina.core.StandardContext.validateFilterMap(StandardContext.java:2897)

 at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:2862)

 at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1267)

 at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1172)

 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)

 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)

 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 6 more

八月 29, 2014 2:47:42 下午 org.apache.catalina.core.ContainerBase startInternal

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

 at java.util.concurrent.FutureTask.report(FutureTask.java:122)

 at java.util.concurrent.FutureTask.get(FutureTask.java:188)

 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)

 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:752)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.startup.Catalina.start(Catalina.java:625)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:606)

 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)

 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)

 at java.util.concurrent.FutureTask.run(FutureTask.java:262)

 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

 at java.lang.Thread.run(Thread.java:744)

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924)

 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 6 more

八月 29, 2014 2:47:42 下午 org.apache.catalina.startup.Catalina start

严重: The required Server component failed to start so Tomcat is unable to start.

org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

 at org.apache.catalina.startup.Catalina.start(Catalina.java:625)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:606)

 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

 at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:752)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 7 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

 at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 9 more

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924)

 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 11 more

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["http-nio-8080"]

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["ajp-nio-8009"]

八月 29, 2014 2:47:42 下午 org.apache.catalina.core.StandardService stopInternal

信息: Stopping service Catalina

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["http-nio-8080"]

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol destroy

严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]

java.lang.NullPointerException

 at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)

 at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)

 at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:792)

 at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)

 at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:842)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.startup.Catalina.start(Catalina.java:629)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:606)

 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["ajp-nio-8009"]

八月 29, 2014 2:47:42 下午 org.apache.coyote.AbstractProtocol destroy

严重: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]

java.lang.NullPointerException

 at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)

 at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)

 at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:792)

 at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)

 at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:842)

 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

 at org.apache.catalina.startup.Catalina.start(Catalina.java:629)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:606)

 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)

 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

天涯离梦残月幽梦 2021-11-28 10:52:40

把你怎樣添加的filter以及filter貼出來唄,不然你讓大家看什麼?

臻嫒无言 2021-11-28 07:17:16

1、检查服务器启动的时候的后台日志,确认启动正常与端口正确
2、先使用FireFox连接服务器,如果不正确,将url-pattern中的内容改成如*.do,再重启服务器,使用Firefox连接服务器,看看是否正常,如果正常,则是filter中的内容异常。

我感觉,一般是你的服务器没有正常启动。应该是filter中发生异常了吧。
如果是filter异常,可以贴一下filter的代码。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文