Tomcat

Client authentication in server Tomcat

拥有回忆 提交于 2021-02-08 09:23:08
问题 i want to configure SSL for mutual authentication. I work with eclipse + tomcat 8. I do this passages: I created private keys in this way: openssl genrsa -des3 -out client_key.pem 2048 openssl genrsa -des3 -out server_key.pem 2048 I created self-signed certificates: openssl req -new -x509 -key client_key.pem -out client.pem -days 365 -config <path to>\openssl.cnf openssl req -new -x509 -key server_key.pem -out server.pem -days 365 -config <path to>\openssl.cnf I created truststore and import

Java Webapp runs fine in Eclipse but not in Tomcat

别说谁变了你拦得住时间么 提交于 2021-02-08 07:37:25
问题 I have a small Java/Spring MVC REST /Maven app that runs just fine in Eclipse but also when I run the following command from the prompt: mvn clean tomcat6:run My problem is when I do: mvn clean package and push the generated war file to the "webapps" folder in my standalone Tomcat instance, the service doesn't work anymore. The standalone Tomcat starts up just fine, no error in the logs. Interestingly enough though the standalone instance listens on port 8989 vs. 8080 when I run the app in

Tomcat 8.5 - 403 Access Denied

為{幸葍}努か 提交于 2021-02-08 07:03:32
问题 I've created a virtual machine with Ubuntu 16.04 LTS and, following this guide, I've installed Tomcat 8.5 and configured as follows: /opt/tomcat/webapps/host-manager/META-INF/context.xml : <Context antiResourceLocking="false" privileged="true"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192\.168\.1\.124|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> </Context> <!-- my local ip is 192.168.1.124 so I've added it --> /opt/tomcat/conf/tomcat-users.xml <role rolename="manager

记一次全站升级https引发的一系列问题

那年仲夏 提交于 2021-02-08 05:30:39
中秋假期,闲来无事。花了一下午折腾了下https,说实话这年头还有网站不上https显然是折腾精神不够啊~ 1、SSL证书评估 看了市面上各种类型的证书,有收费的也有免费的,但是最终还是选择了腾讯云提供的TrustAsia一年免费期的证书,没有次数限制,可以过期后再次申请。最主要的原因还是我懒,哈哈~~ 2、SSL证书安装 从腾讯云将申请的证书下载到本地,解压获得3个文件夹,分别是Apache、IIS、Nginx 服务器的证书文件,可以根据自己的实际情况,安装在三种服务器上。 我这里使用Nginx做前端转发。更多的介绍可以查看文档:https://cloud.tencent.com/document/product/400/4143 2.1 获取证书 Nginx文件夹内获得SSL证书文件 1_www.domain.com_bundle.crt 和私钥文件 2_www.domain.com.key, 1_www.domain.com_bundle.crt 文件包括两段证书代码 “-----BEGIN CERTIFICATE-----”和“-----END CERTIFICATE-----”, 2_www.domain.com.key 文件包括一段私钥代码“-----BEGIN RSA PRIVATE KEY-----”和“-----END RSA PRIVATE KEY-----”。

How to reload properties file without rebooting Tomcat

时间秒杀一切 提交于 2021-02-08 03:29:05
问题 I load a property file from classpath with the method : String cheminFichier = new StringBuilder(100).append(classeBP.getPackage().getName().replace(".", "/")).append(File.separator).append( REPERTOIRE_MAPPING).append(nomFichier).append(".properties").toString(); InputStream isMapping = Thread.currentThread().getContextClassLoader().getResourceAsStream(cheminFichier.toString()); if (isMapping == null) { throw new ServiceMappingException("Erreur lors du chargement du mapping du service. Le

stomp/sockjs 404 not found error in jboss 6.4

穿精又带淫゛_ 提交于 2021-02-08 03:08:25
问题 I m trying to deploy spring-websocket-portfolio sample app wich use stomp/sockjs client with spring j2ee server . the same war package succeed in Tomcat7 and failed in jboss 6.4 and Tomcat6 with 404 error code . The error in chrome console is : sockjs.js:1622 GET http://localhost:8080/spring-websocket-portfolio/portfolio/info?t=1466117690528 404 (Not Found) Any idea ? 回答1: Your server needs to be Servlet 3.0+ and should support the websocket API. You'll find the list of officially supported

Error Deploying Java WAR File: SEVERE: Exception fixing docBase for context

孤者浪人 提交于 2021-02-07 12:15:53
问题 I have already resolved this one but it may help someone out there who stumbles across this problem. Stackoverflow has saved me countless hours on seemingly obscure and mysterious IT issues in the past. Here is the error I was getting when deploying a WAR file to Tomcat on Windows. The WAR file was built on a Mac using JRuby & Warbler. SEVERE: Exception fixing docBase for context [/XYZ] java.io.IOException: The filename, directory name, or volume label syntax is incorrect According to others

Error Deploying Java WAR File: SEVERE: Exception fixing docBase for context

可紊 提交于 2021-02-07 12:14:30
问题 I have already resolved this one but it may help someone out there who stumbles across this problem. Stackoverflow has saved me countless hours on seemingly obscure and mysterious IT issues in the past. Here is the error I was getting when deploying a WAR file to Tomcat on Windows. The WAR file was built on a Mac using JRuby & Warbler. SEVERE: Exception fixing docBase for context [/XYZ] java.io.IOException: The filename, directory name, or volume label syntax is incorrect According to others

IntelliJ IDEA 13.0.3 and Tomcat 8.0.9. Cant get it to work

断了今生、忘了曾经 提交于 2021-02-07 11:22:12
问题 I'm trying to deploy a Java web application running on Tomcat. I got the book Professional Java for Web Applications: Featuring Websockets, Spring Framework, JPA Hibernate, and Spring Security and I've done everything said to get IntelliJ IDEA 13 work together with Tomcat 8.0.9. I've tested the server container manually and it works great, even deploying .war files works great. However when i move on to start/debug a web application - in this case the first example form the book - from

java.lang.ClassNotFoundException: javax.ws.rs.client.RxInvokerProvider

匆匆过客 提交于 2021-02-07 09:43:28
问题 Im trying to login from a jsp page, using a loginServlet. It redirects to the servlet, but it doesn't make the authentication and throws an error. Here is the code: JSP file: <div class="container"> <div class="row"> <div class="box"> <div class="col-md-6 col-md-offset-4"> <h2 class="intro-text">Welcome! Login here:</h2> <form class="form-horizontal" action="LoginServlet" method="POST"> <div class="form-group"> <label class="control-label col-sm-2" for="username">Username:</label> <div class=