tomcat8

How to change Cookie Processor to LegacyCookieProcessor in tomcat 8

三世轮回 提交于 2019-11-27 14:41:05
My code is working on tomcat 8 version 8.0.33 but on 8.5.4 i get : An invalid domain [.mydomain] was specified for this cookie. I have found that Rfc6265CookieProcessor is introduced in tomcat 8 latest versions. It says on official doc that this can be reverted to LegacyCookieProcessor in context.xml but i don't know how. Please let me know how to do this. Thanks You can try in context.xml <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" /> reference: https://tomcat.apache.org/tomcat-8.0-doc/config/cookie-processor.html Enabling the LegacyCookieProcessor which is

Tomcat 8 throwing - org.apache.catalina.webresources.Cache.getResource Unable to add the resource

我们两清 提交于 2019-11-27 10:15:39
I have just upgraded Tomcat from version 7.0.52 to 8.0.14. I am getting this for lots of static image files: org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/base/1325/WA6144-150x112.jpg] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache I haven't specified any particular resource settings, and I didn't get this for 7.0.52. I have found mention of this happening at startup in a bug report that was supposedly fixed. For me this is happening not at startup but

tomcat8 at 100% cpu when trying https on port 80

淺唱寂寞╮ 提交于 2019-11-27 08:30:05
问题 When trying to connect to tomcat 8 using https://localhost:8080/ tomcat get stuck at 100% cpu with ip - - [12/Jan/2017:12:14:23 +0100] "-" 400 - - in the access_log and Jan 12, 2017 1:23:50 PM org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. in catalina.out On firefox I get SSL_ERROR_RX_RECORD_TOO_LONG I tried with tomcat8 with the default configuration (fresh

Adding external resources to class-path in Tomcat 8

三世轮回 提交于 2019-11-27 07:17:44
I have a Tomcat application which needs to reference some properties files that are external to the app. Generally these are stored on a local machine at a specific place like C:\PROJECT_NAME\conf\ . In Tomcat 7 this was achievable by placing a context.xml file inside of /META-INF/ which used a VirtualWebappLoader to essentially add this location to the application classpath as follows: <Context> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/PROJECT_NAME/conf" searchVirtualFirst="true" /> </Context> How do I achieve this same thing in Tomcat 8? There is

403 Access Denied on Tomcat 8 Manager App without prompting for user/password

狂风中的少年 提交于 2019-11-27 07:04:33
I have set up tomcat 8 according to this , and I have the following tomcat-users.xml file: <?xml version="1.0" encoding="UTF-8"?> <tomcat-users xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" version="1.0"> <role rolename="manager-gui"/> <role rolename="manager-script"/> <user username="notadmin" password="not_real_pass" roles="manager-gui"/> <user username="cargo" password="not_real_pass" roles="manager-script"/> <tomcat-users/> When I try to access the Manager App, I get rejected

Implementing 2 way SSL using spring boot

谁都会走 提交于 2019-11-27 05:37:50
问题 I'm creating some restful web services and am using Spring-Boot to create an embedded tomcat container. One of the requirements is that this implements 2 way SSL. I've been looking at the HttpSecurity object and can get it to only run the webservices over an SSL channel using this:- @Override protected void configure(HttpSecurity http) throws Exception { System.out.println("CONFIGURED"); http // ... .requiresChannel() .anyRequest().requiresSecure(); } What I can't seem to find is a way of

Tomcat 8 enable debug logging to list unneeded jars

蹲街弑〆低调 提交于 2019-11-27 05:06:23
When starting Tomcat 8 on Arch Linux ARM I get the following warning: INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.` I already modified ${catalina.home}/logging.properties like described here: How to fix JSP compiler warning: one JAR was scanned for TLDs yet contained no TLDs? I changed some logging levels from INFO to FINE, uncommented "org.apache.jasper.compiler

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

我的未来我决定 提交于 2019-11-27 03:40:34
问题 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 回答1: Tomcat 8+ comes bundled with a filter to set the character encoding. This is described in Tomcat 8

HTTP Status 405 - JSPs only permit GET POST or HEAD

扶醉桌前 提交于 2019-11-27 02:43:07
问题 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

Spring boot embedded tomcat logs

99封情书 提交于 2019-11-27 02:42:32
问题 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 ? 回答1: Found it !! You are now able to see the internal Logs of Embedded Tomcat in your App's Log4j log file with 3