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

I had the same issue when upgrading from Tomcat 7 to 8: a continuous large flood of log warnings about cache. 1. Short Answer Add this within the Context xml element of your $CATALINA_BASE/conf/context.xml: <!– The default value is 10240 kbytes, even when not added to context.xml. So increase it high enough, until the problem … Read more

Tomcat 8 enable debug logging to list unneeded jars

Try debugging for everything by: Adding this to the end of your logging.properties file located in {CATALINA-HOME}/conf: #To see the most detailed level of logging for all classes, uncomment the following line: org.apache.catalina.level=FINEST Restart Tomcat Run the following from Terminal to get a list of jars that need to be skipped (courtesy of @joseph-lust on … Read more

Adding external resources to class-path in Tomcat 8

There is a section about this in the Tomcat 8 migration guide which will direct you to use a resources configuration In particular, you will be creating a WebResourceRoot object which contains the following text in its description. VirtualWebappLoader – Replaced by Pre- and Post-Resources mapped to WEB-INF/lib and WEB-INF/classes Your new context.xml will look … Read more

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

This may be work. Find the CATALINA_HOME/webapps/manager/META-INF/context.xml file and add the comment markers around the Valve. <Context antiResourceLocking=”false” privileged=”true” > <!– <Valve className=”org.apache.catalina.valves.RemoteAddrValve” allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ /> –> </Context> You can find more details at this page.

Tomcat 8 Maven Plugin for Java 8

Yes you can, In your pom.xml, add the tomcat plugin. (You can use this for both Tomcat 7 and 8): pom.xml <!– Tomcat plugin –> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http:// localhost:8080/manager/text</url> <server>TomcatServer</server> *(From maven > settings.xml)* <username>*yourtomcatusername*</username> <password>*yourtomcatpassword*</password> </configuration> </plugin> tomcat-users.xml <tomcat-users> <role rolename=”manager-gui”/> <role rolename=”manager-script”/> <user username=”admin” password=”password” roles=”manager-gui,manager-script” /> </tomcat-users> settings.xml (maven … Read more

Tomcat 8 is not able to handle get request with ‘|’ in query parameters?

This behavior is introduced in all major Tomcat releases: Tomcat 7.0.73, 8.0.39, 8.5.7 To fix, do one of the following: set relaxedQueryChars to allow this character (recommended, see Lincoln’s answer) set requestTargetAllow option (deprecated in Tomcat 8.5) (see Jérémie’s answer). you can downgrade to one of older versions (not recommended – security) Based on changelog, … Read more

The method getDispatcherType() is undefined for the type HttpServletRequest

You’re not supposed to provide Servlet API along with the web application archive if the target runtime already provides the API out the box. Tomcat as being a JSP/Servletcontainer already provides JSP, Servlet and EL APIs out the box. When you provide them along with your webapp anyway, then you may run into classloading conflicts … Read more