tomcat8

Tomcat 8 URL Rewrite

邮差的信 提交于 2019-11-29 03:50:29
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="webapps/MyDomainServer" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware=

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

随声附和 提交于 2019-11-29 01:51:50
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.AuthenticatorBase.invoke(AuthenticatorBase.java:431) at org.apache.catalina.core.StandardHostValve.invoke

How does Server-Sent-Events work

给你一囗甜甜゛ 提交于 2019-11-29 01:06:56
问题 I tried an SSE (Server-Sent-Events) using java on tomcat 8.0. Here are few things I noticed. I click a button that automatically makes a request to the servlet. Servlet's GET method gets executed which returns an event stream. Once the full stream is received, the page again automatically makes another request which receives the same data again!!! I don't have an infinite loop there!!! What is actually happening on the server? In normal scenarios, tomcat creates a thread to handle every

How to Allow ^ character in URLs for tomcat 8.5

强颜欢笑 提交于 2019-11-28 23:57:30
I have a request URL of below format http://hostname:port/path&param1={"vars":[{"a":"val1","b":"^"},{"c":"val2","d":"^"}]}&param2=Value3|95|3%20-%206%20Months I changed catalina.properties as per this stackoverflow question . But as per tomcat documentation tomcat.util.http.parser.HttpParser.requestTargetAllow property is deprecated and relaxedPathChars and relaxedQueryChars attributes are to be used with Connector tag instead. However, when i change the xml file to below <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" relaxedQueryChars="^"

Spring Boot Programmatically setting profiles

核能气质少年 提交于 2019-11-28 23:46:31
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(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "dev"); ApplicationContext ctx = SpringApplication.run(Application

How do you enable TLS 1.2 on Spring-boot?

蹲街弑〆低调 提交于 2019-11-28 20:37:02
问题 I am trying to enable TLS 1.2 on Tomcat on Spring-boot 1.2.1. Android 5.0 is failing to connect to the default SSL settings, due to an SSL handshake failure. Android 4.4, iOS, Firefox, and Chrome all connect to the default version. I think this is because of a mismatch in the TLS protocols supported in Android 5.0 and the spring boot tomcat defaults (TLS v1?). I imagine I want to change this application.properties setting: server.ssl.protocol=TLS but I have not located the other acceptable

Can't access Tomcat 8 Manager App

余生长醉 提交于 2019-11-28 18:53:24
I've just set up Tomcat 8 on an Ubuntu 14.04 VM and I'm not able to access the Manager App at http://[hostname]:8080/manager/html from my browser. I get a "403 Access Denied" error as soon as I click on it. I am running Tomcat as a service defined in a config file in /etc/init.d/tomcat8-dev . The error message indicates that Tomcat is set up to be accessible only from localhost initially, but as it is a hosted VM I'm not able to run a browser on it. I have set up a user in the tomcat-users.xml file as several people have recommended. However, I am not prompted to provide the credentials for

Why does my Tomcat only open 8 JDBC connections

六月ゝ 毕业季﹏ 提交于 2019-11-28 12:43:26
When setting up the database connections in Tomcat 8, for some reason Tomcat is not following what I configured in the context.xml, with as result that I run out of connections, leading to resource contentions at the application server side (BLOCKED/WAITING threads). I always have 8 connections (show processlist in mariadb/mysql) after the pool initializes. My configuration states a minimum of 10 connections and a maximum of 100 connections. I tested different configurations, but this does not make any difference at all, which is strange at least. The context.xml is used else it would not be

Tomcat 8 Embedded - WebServlet - 'A child container failed during start'

浪子不回头ぞ 提交于 2019-11-28 12:41:50
问题 I have an embedded Tomcat server that is serving static files just fine. But when I add the buildPath code required to get @WebServlet working, it doesn't work in one of my projects (there are plenty of differences between projects... about 50K lines worth). I get the following error before web.xml is even read (I know this from strace -ff ). org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase

Tomcat 8 - LDAP: NameNotFoundException error code 32, remaining name empty string

喜你入骨 提交于 2019-11-28 11:56:45
Trying to migrate an application from WebLogic 12.2.1 to Tomcat 8.5.4 , what under Weblogic was an entry as Foreign JNDI Providers for an LDAP connection has been migrated to a new Resource under Tomcat. Following this advice on Stack Overflow, a custom LdapContextFactory has been packaged as a new jar file under Tomcat lib folder. In the Tomcat server.xml file the following GlobalNamingResources/Resource has been configured: <Resource name="ldapConnection" auth="Container" type="javax.naming.ldap.LdapContext" factory="com.sample.custom.LdapContextFactory" singleton="false" java.naming