tomcat8

How to set tomcat 8 container character encoding of request and response to UTF-8 intead of ISO-8859-1

偶尔善良 提交于 2019-11-28 11:43:36
We need to set tomcat 8 container character encoding of request and response to UTF-8 intead of ISO-8859-1 , What is the setting for the same We tried setting as mentioned below , https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q1 But that requires creating filter etc. Is there any elegant way where we can just change some configuration set to make it applicable at container level Tomcat 8+ comes bundled with a filter to set the character encoding. This is described in Tomcat 8 Container Provided Filters . This filter needs to be configured in your web.xml file plus a few other changes as

Spring boot embedded tomcat logs

谁说我不能喝 提交于 2019-11-28 10:00:07
i'm using spring boot embedded tomcat with spring boot 1.5.9 , im also using Log4j2. recently i exerience problems during load, so i want to understand better the tomcat logs [Not the access Logs] , i tried (in application.properties) : logging.level.org.apache.tomcat: INFO logging.level.org.apache.catalina: INFO but none of the above worked. is there any other way to achieve it ? Found it !! You are now able to see the internal Logs of Embedded Tomcat in your App's Log4j log file with 3 easy steps: 1] add to your pom: <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j

HTTP Status 405 - JSPs only permit GET POST or HEAD

早过忘川 提交于 2019-11-28 09:47:14
Since JSP 2.3 (Tomcat 8) only supported method for JSP is GET POST or HEAD: https://jcp.org/aboutJava/communityprocess/maintenance/jsr245/245-MR3.html http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?view=diff&r1=1497877&r2=1497878&pathrev=1497878 But, I suppose, it is a big incompatible change as, for example, for exception handler it is used to forward to JSP for rendering exception and iso JSP view since JSP 2.3 response is: Method Not Allowed HTTP Status 405 - JSPs only permit GET POST or HEAD description The specified HTTP method is not allowed for

How do I configure this property with Spring Boot and an embedded Tomcat?

你。 提交于 2019-11-28 07:48:35
Do I configure properties like the connectionTimeout in the application.properties file or is the somewhere else to do it? I can't figure this out from Google. Tomcat properties list I found this Spring-Boot example , but it does not include a connectionTimeout property and when I set server.tomcat.connectionTimeout=60000 in my application.properties file I get an error. Spring Boot 1.4 and later As of Spring Boot 1.4 you can use the property server.connection-timeout . See Spring Boot's common application properties . Spring Boot 1.3 and earlier Provide a customized

Run Vaadin 8.1 app under Java 9 prerelease in IntelliJ 2017.2.2

狂风中的少年 提交于 2019-11-28 01:33:30
In IntelliJ 2017.2.2 I am able to run a Vaadin 8.1.2 app (brand-new vaadin-archetype-application archetype) with Tomcat 8.5.20 under Java 9+181 if the Project Structure > Project SDK is set to Java 1.8. If Project Structure > Project SDK is set to Java 9 I get this compiler error around FillIn with assertion error about filling something to do with Vaadin MouseEvents. I have tried googling but found no clues. Information:java: An exception has occurred in the compiler (9). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the

NullPointerException deploying Spring/MyFaces Applicationon Tomcat 8.0.0 RC5

被刻印的时光 ゝ 提交于 2019-11-28 01:27:36
问题 I developed a new application and it runs perfectly on Tomcat 7! But I am trying to deploy the same WAR on Tomcat 8 and I am getting a NullPointerException . To develop this application, I am used the following frameworks and libs: Maven 3; JPA 2 / Hibernate 4.2.6.Final; Spring 3.2; Spring Security 3.2.RC; MyFaces 2.1.12; Primefaces 4.0; No error occurs when I deploy on Tomcat 7.0.42. Runs fine. But, when I deploy the same WAR on Tomcat 8.0.0 RC5, I am getting this exception: 30-Oct-2013 16

Tomcat 8 (and 9) coerce behaviour, null strings are incorrectly set as empty strings

ⅰ亾dé卋堺 提交于 2019-11-28 00:11:24
I have just migrated to Tomcat 8. I used to work with system property org.apache.el.parser.COERCE_TO_ZERO=false so empty strings, numbers, booleans etc. are treated as null . In Tomcat 8, EL 3.0, it is supposed to be the default but it is in fact converting null string to empty string "" on JSF side. It is supposed to be a bug and it is supposed to be corrected but I'm not able to get it working in TomEE snapshot (Tomcat 8.0.27.0, MyFaces 2.2.8). BalusC This is a bug in the EL 3.0 specification. Since EL 3.0, as consequence of overzealous fix of JSP spec issue 184 , null will be coerced back

Should I add both JAVA_HOME and JRE_HOME in environmental variable, PATH?

回眸只為那壹抹淺笑 提交于 2019-11-27 22:32:19
I ran into this error while setting up my Tomcat and Java environmental path: Neither the JAVA_HOME nor the JRE_HOME environmental variables is defined. At least one of the 2 environmental variables is needed to run this program. In the user variables: I created JAVA_HOME variables and add C:\Program Files\Java\jdk1.8.0_25 to its path. and then did an edit of system variable PATH , added C:\Program Files\Java\jdk1.8.0_25; to the beginning of the its path. I also created JRE_HOME in user variable and added C:\Program Files\Java\jre1.8.0_25 to its path. Is it necessary to create JRE_HOME and

Tomcat 8 URL Rewrite

时光毁灭记忆、已成空白 提交于 2019-11-27 17:42:16
问题 I have an AngularJS webapp and Jersey backend. I need to setup URL rewriting, so everything except given exceptions will be rewritten to Angular's index.html. Eg.: http://my.domain.com/about will be rewritten http://my.domain.com/photos/photo1.jpg will NOT be rewritten (file photo 1 exists) http://my.domain.com/rest/myservice will be NOT be rewritten (it is a call to REST service) I have set up the Tomcat 8 URL Rewrite Valve as follows: in conf/server.xml <Host name="my.domain.com" appBase=

Upgrading Spring Boot from 1.3.7 to 1.4.0 causing NullPointerException in AuthenticatorBase.getJaspicProvider

戏子无情 提交于 2019-11-27 16:14:42
问题 This is somewhat caused by the tomcat-embed-core version 8.5.4 that comes with the spring-boot-starter-jersey. It generates an error shown below on all integration tests. It will only work if I override the pom to use tomcat-embed-core version 8.0.36. What's weird is, that's the only error message I get. java.lang.NullPointerException: null at org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1140) at org.apache.catalina.authenticator