tomcat8

Failed to start component [StandardEngine[Catalina].StandardHost[localhost]

瘦欲@ 提交于 2019-12-01 05:53:52
问题 When trying to start tomcat I get this error. What could be the cause of this? I've go through a bunch of similar posts and I can't find anything. I am using Apache Tomcat v8.0 and JRE 1.8.0 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ocmsLatest]] at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org

Why does servletContext.getRealPath returns null on tomcat 8?

♀尐吖头ヾ 提交于 2019-12-01 01:00:35
问题 I have the following code line: servletContext.getRealPath("resources/images/video_icon.png") Wen I run application using jetty(using maven plugin) this code line return corect value. When I run application using tomcat 8(on tomcat 7 it works) - application returns null. application structure: 1.How to fix it? 2.Why does it happen? 回答1: after adding / in the path beginning it works for both: jetty and tomcat 8 servletContext.getRealPath("/resources/images/video_icon.png") 来源: https:/

Spring Boot: remove jsessionid from url

你离开我真会死。 提交于 2019-12-01 00:20:31
How can I remove the jsessionid from my urls? I'm using Spring Boot MVC (without Spring Security; tomcat embedded). I've read that It could be done by setting the disableUrlRewriting to "true". But this looks like a Spring Security solution, which I don't use (it's a simple project without login; just pages; a session-controller exists and has to be a session-controller). I'm asking this because GoogleBot is creating urls containing the id. EDIT: I solved it with the solution described at: https://randomcoder.org/articles/jsessionid-considered-harmful I created a quick-and-dirty spring-boot

windows应用迁移到linux下

时光怂恿深爱的人放手 提交于 2019-11-30 23:12:38
这里是给创业公司进行更换系统。由于平时用到的并不多,只有一台服务器。 在迁移之前把应用,数据库数据都下载下来,然后更换系统为centos7 1、首先是迁移数据库。 安装mysql5.7数据库后,把数据导入进数据库。由于linux数据严格区分大小写,顾 #vim /etc/my.cnf 添加lower_case_table_names=1 到my.cnf中。 1.2、安装tomcat,将应用放到tomcat中。 2.Nginx安装 我使用的环境是64位 Ubuntu 14.04。nginx依赖以下模块: l gzip模块需要 zlib 库 l rewrite模块需要 pcre 库 l ssl 功能需要openssl库 2.1.安装pcre 1. 获取pcre编译安装包,在 http://www.pcre.org/ 上可以获取当前最新的版本 2. 解压缩pcre-xx.tar.gz包。 3. 进入解压缩目录,执行./configure。 4. make & make install 1.2.安装openssl 1. 获取openssl编译安装包,在 http://www.openssl.org/source/ 上可以获取当前最新的版本。 2. 解压缩openssl-xx.tar.gz包。 3. 进入解压缩目录,执行./config。 4. make & make install 2.3

AbstractMethodError with jTDS JDBC Driver on Tomcat 8

帅比萌擦擦* 提交于 2019-11-30 23:10:25
问题 I am deploying a web app (WAR) to a Tomcat 8 web container. The WAR includes in the '/WEB-INF/lib' directory the following jTDS JDBC driver: <dependency org="net.sourceforge.jtds" name="jtds" rev="1.3.1" /> (file is: jtds-1.3.1.jar ). This is how the resource is defined in META-INF/context.xml : <Resource name="jdbc/jtds/sybase/somedb" auth="Container" type="javax.sql.DataSource" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sybase://localhost:2501/somedb" username=

Spring Boot: remove jsessionid from url

走远了吗. 提交于 2019-11-30 20:03:33
问题 How can I remove the jsessionid from my urls? I'm using Spring Boot MVC (without Spring Security; tomcat embedded). I've read that It could be done by setting the disableUrlRewriting to "true". But this looks like a Spring Security solution, which I don't use (it's a simple project without login; just pages; a session-controller exists and has to be a session-controller). I'm asking this because GoogleBot is creating urls containing the id. EDIT: I solved it with the solution described at:

How can I specify “Context path” on Tomcat 8 inside META-INF/context.xml in java war file?

牧云@^-^@ 提交于 2019-11-30 15:28:36
问题 How can I deploy mywebapp-1.0.0.war to $TOMCAT_HOME/webapps directory with context path /mywebapp using context.xml inside the war file on Tomcat 8? I'm getting back to work with Tomcat after long time since version 5. I'm used to create META-INF/context.xml inside my war file: <?xml version="1.0" encoding="UTF-8"?> <Context path="/mywebapp"> ... </Context> Maven creates a war file with this name: mywebapp-1.0.0.war But when I deploy the war file to $TOMCAT_HOME/webapps directory the context

How can I specify “Context path” on Tomcat 8 inside META-INF/context.xml in java war file?

て烟熏妆下的殇ゞ 提交于 2019-11-30 15:18:31
How can I deploy mywebapp-1.0.0.war to $TOMCAT_HOME/webapps directory with context path /mywebapp using context.xml inside the war file on Tomcat 8? I'm getting back to work with Tomcat after long time since version 5. I'm used to create META-INF/context.xml inside my war file: <?xml version="1.0" encoding="UTF-8"?> <Context path="/mywebapp"> ... </Context> Maven creates a war file with this name: mywebapp-1.0.0.war But when I deploy the war file to $TOMCAT_HOME/webapps directory the context path will be http://localhost:8080/mywebapp-1.0.0 instead of http://localhost:8080/mywebapp/ . Also I

Spring Boot Embedded Tomcat Performance

て烟熏妆下的殇ゞ 提交于 2019-11-30 09:20:35
I am developing Microservices API for my application. I started with Spring Boot application. I created two artifacts - "business code with embedded tomcat" and "business code without embedded tomcat" . When I compare the performance results, I can see that the "non-embedded tomcat" (i.e. executing on standalone tomcat) gives good output because of native execution. So basically what is the difference between the embedded tomcat and the standalone tomcat regarding implementation? How the performance varies between two executions? Peter Jerald I found out actual root cause of this issue. APR

Spring Boot Programmatically setting profiles

﹥>﹥吖頭↗ 提交于 2019-11-30 06:47:05
问题 How to set active profile in spring boot Application. This application will be deployed in stand alone Tomcat. I have 2 property files application-{profile}.properties. My Application class @SpringBootApplication public class Application extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(Application.class); } public static void main(String[] args) { System.setProperty