zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
125 stars 56 forks source link

Unable to configure the Ajp port #42

Closed ndreddy closed 4 years ago

ndreddy commented 4 years ago

I was using Smart tomcat 3.1 earlier where I can configure Ajp port. I just upgraded to 3.6 but that option is missing. In my env multiple tomcat services are running simultaniously using different AJP ports. So I need run multiple tomcats in debug mode. If I run with default port I get the following exception LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]

Is there any work arround for this? If possible can you please enable this configuration.

ndreddy commented 4 years ago

IntelliJ idea CE build 2019.3

zengkid commented 4 years ago

@ndreddy from apache-tomcat-9.0.31, it disable the AJP config. it you must using different AJP. you can duplicate 2 tomcats and add 2 tomcat servers in Smart Tomcat Server setting. and then update tomcat_home\config\server.xml, make the ajp diff ports.

ndreddy commented 4 years ago

@zengkid Thank you for the quick response. I tried it. But when it copies to .SmartTomcat dir, it is overriding the server.xml (only AJP port) with default one 8009. I have one more requirement where custom library need to be loaded from a location specified in catalina.properties shared.loader. shared.loader="${catalina.home}/mylib","${catalina.home}/mylib/*.jar" I tried defining env param like catalina.home=D:\tomcat... But no change. It throw warning org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [C:\Users....SmartTomcat\MyServer\MyServer\mylib], exists: [false], isDirectory: [false], canRead: [false] When I copy the mylib dir to .SmartTomcat\MyServer\MyServer\ it works.

Otherwise I love this plugin for its simplicity.

Please advice.

Thanks ndreddy

zengkid commented 4 years ago

@ndreddy

  1. no need copy it to .SmartTomcat, add 2 tomcats as below, one server.xml ajp port ss 8009, other one port is 8010 image
  2. for external lib jars, you can put them into tomcat_home/lib.
dhsilva-cit commented 4 years ago

I can see that this issue is already closed, but all my team and I are facing the same problem. Since we are still using Tomcat 7, and we use the same server to run multiple apps in multiple instances, we need do change de AJP port for each of them.

Since creating other servers is an option, it is too complex to us, since we run a lot of apps/instances. For now, we have disabled the plugin auto-update and stick to the 3.5. But it would be good have this feature again.

What if you re-add that, but just for Tomcat 8 and bellow?