vscode-tomcat
vscode-tomcat copied to clipboard
Can't change CATALINA_BASE
Hi,
I'm working on Liferay, with an embedded tomcat. So I added the tomcat folder. When I start the server, it seems to use the following CATALINA_BASE :
...\workspaceStorage\fec42f93b753ebda2508e0f3a9ef873f\adashen.vscode-tomcat\tomcat\tomcat-7.0.62
Unfortunally, that's not what I want. I would like to set the CATALINA_BASE with the real tomcat folder path.
Could it be possible to define environment variables for each tomcat registered in vscode ?
Thank you.
You could configure the tomcat.workspace
in VSCode settings.
But it will affect all my tomcat instances. In my case, I just don't work by copy. If I add a tomcat folder, I would like to use that folder (and that instance obviously). That's why defining CATALINA_BASE and CATALINA_HOME should be editable for each tomcat :(.
Seems I misunderstood your points.
Let me explain the current behavior of the extension first:
tomcat.workspace
is the workspace of the Tomcat extension. That is where the extension manages all the server instances. So yes, the Tomcat extension works by copying. Users specify the server path, and it is copied to the workspace for following operations such as start
, stop
or rename
a server instance.
In this way, all operations are performed on the instances. Users could add several instances from one server and they don't influence each other.
And the expected behavior I think you are expecting is the extension to support to use the server itself instead of the copied instance, right?
It sounds a solid feature request to me. In order to support this, we could add new operators like Use Existing
server together with the Add
button and Refresh
button in the upper right corner of the extension explorer. This will not break the current behaviors.
And the expected behavior I think you are expecting is the extension to support to use the server itself instead of the copied instance, right?
Right ! The feature is exactly what I am looking for !
What is the timeline on this ticket ?
+1 on this feature getting priority!
This issue is really important for me. I currently can't use this tomcat extension at all because it's not actually running my external tomcat instance.
My tomcat setup is really complicated, so when the extension tries to copy things (to its local tomcat copy), it misses half of my webapps, and the other half won't even run.
Any chance someone could work on this?
I changed the setting tomcat.workspace but still application gets deployed to CATALINA_BASE.
I don't have CATALINA_BASE env variable setup but still plugin seems to set it to some folder.
Also there should be a way to at least view various env variables that the plugin uses when it's serving application.
I started a fork to add a new Run In Place setting: https://github.com/jeffrpowell/vscode-tomcat. Got the feature mostly working, but noticed an unexpected behavior of the current extension: it doesn't try to run tomcat's included startup.bat or catalina.bat file (or their .sh equivalent). It instead incompletely ports over the behavior from catalina.bat/sh into the extension's code (thus bypassing things like the setenv hook in the startup scripts). I'm working on seeing what it might look like to drop the custom port and reuse the tomcat startup script instead.
All done with my PR!
I would recommend Community Server Connector as an alternative extension.