skip to Main Content

DefaultHttpClient call throws connection refused in the same tomcat with public ip – CentOS

centos 7, tomcat 8.5. a.war and rest.war are in the same tomcat. a.war use following code to call rest.war: import org.apache.http.impl.client.DefaultHttpClient; DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json"); StringEntity se = new StringEntity(json.toString()); se.setContentType("text/json"); se.setContentEncoding(new…

VIEW QUESTION

Tomcat manager app: not authorized to view page – Plesk

I try to deploy my app from Docker. In Dockerfile: FROM tomcat:9-jre8-alpine ADD config/tomcat-users.xml /usr/local/tomcat/conf/tomcat-users.xml ADD config/settings.xml /usr/local/tomcat/conf/settings.xml ADD config/context.xml /usr/local/tomcat/webapps/manager/META-INF/context.xml ADD target/author.war /usr/local/tomcat/webapps/ROOT.war EXPOSE 8080 CMD ["catalina.sh","run"] so, in tomcat-users.xml: <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 http://tomcat.apache.org/xml " version="1.0"> <role…

VIEW QUESTION
Back To Top
Search