Tag: tomcat7

spring警告:不支持请求方法“HEAD”

在tomcat 7上成功部署后,我每秒都会收到警告消息: org.springframework.web.servlet.PageNotFound handleHttpRequestMethodNotSupported警告:不支持请求方法’HEAD’ 但应用程序工作。 如何避免这个恼人的消息?

为什么Ant在部署时返回403?

我正在尝试部署到Tomcat 7中的war文件。它给了我以下错误。 deploy: [echo] Deploying on Tomcat. BUILD FAILED C:\Users\coder\workspace\projectName\build.xml:84: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8090/manager/deploy?path=%2FprojectName 这是我的构建文件

Java / JSF / Tomcat / Spring – Proxy-Object与原始对象有不同的方法

今天我遇到了这个问题,这真的让我感到困扰,因为几乎代码已经运行了(并且即使在恢复到旧版本之后也停止了工作)。 我正在Facelets-Page上访问一个Spring-Bean。 Spring在Proxies中包装这些对象以使用方面和其他一些东西。 问题是,我在尝试访问bean的属性时遇到exception。 例外是这样的: javax.el.PropertyNotFoundException: /customers.xhtml @23,27 value=”#{customerBean.customer}”: Property ‘customer’ not found on type $Proxy88 我肯定知道(!!)有相应的getter / setter方法。 到目前为止我尝试的事情: 将应用程序部署到另一个tomcat安装 清除所有tomcat-caches,webapp目录 清理eclipse项目 使用javap(以及那里的方法/属性)检查相应的方法 更改bean的范围 更改bean的类名 更改spring bean-id 更改bean的serialVersionUID 无论我做什么,类都不正确地被类加载器正确包装或者没有正确加载。 有谁知道什么可能导致这样的问题? 我不知道该怎么做,所以任何建议都非常感谢! 提前致谢! 问候,罗伯特

无法找到或加载主类org.apache.catalina.startup.Bootstrap

当我在Eclipse中运行apache tomcat7.0.56时,出现错误 错误:无法找到或加载主类org.apache.catalina.startup.Bootstrap 我该如何解决这个问题?

如何将我的JAR库添加到ubuntu中的tomcat7安装

我正在尝试用tomcat7建立一个ubuntu服务器,我使用basic安装了tomcat7 在ubuntu中sudo apt-get install tomcat7 ,我在我的应用程序中有一些常见的库,比如JSTL和其他东西,所以我想在webserver include文件夹中创建它们。 我在搜索互联网后把它们放在服务器的每个地方,但是永远不会加载,放在哪里的正确位置? 我已经在Windows中完成了它并且它工作得很好,但是在ubuntu它似乎不起作用,或者我应该以其他方式安装tomcat?

tomcat7-maven-plugin:运行多个webapps但端口8080已经在使用中

我正在尝试使用tomcat7-maven-plugin来设置嵌入式tomcat容器,在pre-integration-test阶段运行webapps,运行集成测试,然后在post-integration-test阶段关闭tomcat。 该项目是一个多模块maven项目(包含app1 , app2等)。 父pom.xml如下所示, org.apache.tomcat.maven tomcat7-maven-plugin 2.1 path/to/context.xml path/to/tomcat-users.xml true tomcat-run run pre-integration-test tomcat-shutdown shutdown post-integration-test 然后我就运行mvn clean integration-test –projects=app1,app2 。 当第二个应用程序启动时 ,我得到java.net.BindException , SEVERE: Failed to initialize end point associated with ProtocolHandler [“http-bio-8080”] java.net.BindException: Address already in use :8080 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:610) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:429) at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) at org.apache.catalina.connector.Connector.initInternal(Connector.java:981) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) […]

嵌入式Tomcat 7与Tomcat 6相比较慢

我最近开始嵌入Tomcat 7进行集成测试,而不是Tomcat 6,因为我需要7个function中的一些,它是我们的目标容器。 与Tomcat 6嵌入式相比,性能非常慢。 启动服务器大约需要20秒。 这是我正在使用的代码: Tomcat tomcat = new Tomcat(); tomcat.setPort(port); tomcat.setSilent(true); tomcat.setBaseDir(“.”); tomcat.getHost().setAppBase(webappDir); tomcat.addWebapp(context, “”); tomcat.start(); 有没有其他人经历过这个或者有提高性能的建议? 我在Windows 7,Linux Mint和Ubuntu上运行测试。

检测客户端中止请求Jersey

我有泽西岛提供一个restfull网络服务。 经常发生客户端中止通过ajax完成的请求,这里解释了ajax abort方法abort ajax request 在服务器端,我得到以下输出。 哪个不好看。 有没有办法在泽西岛检测中止的请求? SEVERE: An I/O error has occurred while writing a response message entity to the container output stream. org.glassfish.jersey.server.internal.process.MappableException: ClientAbortException: java.net.SocketException: Broken pipe at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:96) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154) at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:571) at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:378) at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:368) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:262) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at […]

将404错误页面重定向到Tomcat中我的Spring MVC webapp的自定义页面

我正在使用tomcat 7,我已经在tomcat 7中构建并部署了一个Spring MVC webapp,它的工作非常好。 我想要的是,每当我的服务器上发生404错误时,它应该被重定向到我在webapp中构建的自定义页面。 我已将我的webapp配置为tomcat中的默认webapp。 我试过这样做: 404 /WEB-INF/templates/error/error.html 但都是徒劳的。 很高兴如果有人能帮助我解决这个问题。

我怎样才能应对“IllegalStateException:BeanFactory未初始化或已经关闭”?

在Tomcat 7上使用Grails 2.0.0,我在启动时获得了以下权利: 2011-08-21 11:10:09,758 [main] ERROR StackTrace – Full Stack Trace: java.lang.IllegalStateException: BeanFactory not initialized or already closed – call ‘refresh’ before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172) at org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1109) at org.codehaus.groovy.grails.web.context.GrailsContextLoader$1.run(GrailsContextLoader.java:88) at org.codehaus.groovy.grails.lifecycle.ShutdownOperations.runOperations(ShutdownOperations.java:62) at org.codehaus.groovy.grails.web.context.GrailsContextLoader.closeWebApplicationContext(GrailsContextLoader.java:136) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4763) at org.apache.catalina.core.StandardContext$4.run(StandardContext.java:5472) at java.lang.Thread.run(Thread.java:619) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5481) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:225) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812) at […]