草庐IT

embedded-tomcat-7

全部标签

公司为什么禁止SpringBoot项目使用Tomcat?

前言在SpringBoot框架中,我们使用最多的是Tomcat,这是SpringBoot默认的容器技术,而且是内嵌式的Tomcat。同时,SpringBoot也支持Undertow容器,我们可以很方便的用Undertow替换Tomcat,而Undertow的性能和内存使用方面都优于Tomcat,那我们如何使用Undertow技术呢?本文将为大家细细讲解。SpringBoot中的Tomcat容器SpringBoot可以说是目前最火的JavaWeb框架了。它将开发者从繁重的xml解救了出来,让开发者在几分钟内就可以创建一个完整的Web服务,极大的提高了开发者的工作效率。Web容器技术是Web项目必

java - Heroku:带有 https tomcat 服务器和证书固定的 Spring Boot Gradle 应用程序

我有一个SpringBootjava应用程序,它使用自签名证书与android前端进行通信。我使用tomcat服务器作为应用程序的容器:compile'org.springframework.boot:spring-boot-starter-tomcat'现在,我启用了https/ssl:TomcatEmbeddedServletContainerFactorytomcat=(TomcatEmbeddedServletContainerFactory)container;tomcat.addConnectorCustomizers(connector->{connector.setPo

java - Spring 数据 MongoDB : How ignore unique indexed field when Document is embedded in another one?

我有一个这样定义的Contract类:@DocumentpublicclassContract{@IdprivateStringid;@Indexed(unique=true)privateStringref;privateStringstatus="pending";//getter&setter&hashcode&equals&tostring...}我想随时间保存契约(Contract)状态,所以我创建了一个Version类,如下所示:@DocumentpublicclassVersion{@IdprivateStringid;privateContractcontract;pr

java - "connectionTimeout"在Tomcat中到底是什么意思?

在文档(Tomcat7Config)中,它是这样写的:ThenumberofmillisecondsthisConnectorwillwait,afteracceptingaconnection,fortherequestURIlinetobepresented.Useavalueof-1toindicateno(i.e.infinite)timeout.Thedefaultvalueis60000(i.e.60seconds)butnotethatthestandardserver.xmlthatshipswithTomcatsetsthisto20000(i.e.20seconds

java - 配置上下文特定的 Tomcat 安全领域

我试图在Tomcat6.0中获取上下文特定的安全领域,但是当我启动Tomcat时出现以下错误:09-Dec-201016:12:40org.apache.catalina.startup.ContextConfigvalidateSecurityRolesINFO:WARNING:Securityrolenamemyroleusedinanwithoutbeingdefinedina我创建了以下context.xml文件:创建了一个文件:my-users.xml,我将其放在WEB-INF/conf下,其中包含以下内容:将以下行添加到我的web.xml文件中:...EntireAppli

java - 为什么我从 Tomcat 7 收到 404 请求的资源不可用错误

我已经尽可能多地在Eclipse中重新创建了这个项目,但仍然出现同样的错误-HTTPStatus404-/SpringTest/hellotypeStatusreportmessage/SpringTest/hellodescriptionTherequestedresource(/SpringTest/hello)isnotavailable.请帮我找出下面代码中的问题。web.xml-Spring3MVCindex.jspspringorg.springframework.web.servlet.DispatcherServlet1spring*.htmlspring-servle

java - NetBeans 7.0、JUnit 和 Glassfish Embedded 3.1 : Does not work

我正在尝试在Win7Professional机器上使用NB7.0、JUnit和嵌入式GlassfishServer对J2EEWeb应用程序进行JUnit测试。我将其分解为仅使用单个sessionBean测试一个简单的Hello-WorldWeb应用程序。我的类路径中有glasfish-embedded-static-shell.jar,也尝试使用glassfish-embedded-all-3.1,但它也没有用。现在这是我用来测试bean的代码:importjavax.ejb.embeddable.EJBContainer;importorg.junit.AfterClass;impo

java - Tomcat 6 不从 WEB-INF/lib 加载 jar

我正在尝试查找我的tomcat环境中的配置问题。我们的生产服务器正在运行tomcat安装并从共享的NFS挂载中读取war。但是,当我尝试用一​​个独立的盒子(使用他们的配置)进行同样的war时,我收到下面发布的错误。有趣的是,如果我将WEB-INF/lib中的所有jar解压到WEB-INF/classes中,这个错误就会消失。所以,似乎有什么东西阻止了应用程序加载WEB-INF/lib路径,但我终究找不到任何会导致这种情况的tomcat设置,因为它正在检测应用程序和配置,只是不包括在内。有什么想法吗?SEVERE:Errorconfiguringapplicationlistenero

java - Tomcat 安装目录无效。它缺少预期的文件或文件夹 lib/jasper-el.jar

我已经下载了LiferayPortal6.1与tomcat捆绑在一起的社区版。然后我下载了liferay的SDK。按照此site中给出的步骤进行操作当我到达第4步时使用liferay配置eclipse,我收到以下错误。所有相关threads特定于ubuntu。但我使用的是windows764位。我不知道如何解决这个问题。所有文件都存在,那么为什么它向我显示此错误。任何帮助将不胜感激。 最佳答案 您似乎正在尝试创建Liferayv6.0TomcatRuntime,然后将目录指向Liferayv6.1Tomcat运行时(注意安装路径中的

java - 为什么 Tomcat 服务器不使用 web.xml 文件作为 Vaadin 7 应用程序中使用的 servlet 配置?

当我使用web.xml作为应用程序中servlets的配置文件时,我无法启动Tomcat,这是文件的内容:AppLifeServletcom.example.application_lifecycle_chapter_4_7.ApplicatationLifecycleUI.ServletUIcom.example.application_lifecycle_chapter_4_7.ApplicationLifecycleUItrueMyPushyServletcom.example.application_lifecycle_chapter_4_7.MyPushyUI.Servlet