zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
126 stars 55 forks source link

Custom Context in the last version of Smart Tomcat for Intellij Community #53

Closed jlparrilla closed 4 years ago

jlparrilla commented 4 years ago

Hello zengkid!

I'm a fan of the Smart Tomcat plugin from Intellij.

In the last versión of the plugin, i have a problem. The box “Custom Context” is missing in the run configuration. How can i specify a custom context for the execution?

Thank you very much for your time, and congratulations for it work.

zengkid commented 4 years ago

Hello zengkid!

I'm a fan of the Smart Tomcat plugin from Intellij.

In the last versión of the plugin, i have a problem. The box “Custom Context” is missing in the run configuration. How can i specify a custom context for the execution?

Thank you very much for your time, and congratulations for it work.

@jlparrilla Please put context.xml into webapp/META-INF/ Please find the example https://github.com/zengkid/smart-tomcat-sample

jlparrilla commented 4 years ago

Ok. This solution is not valid for me. I use diferent values of context variable for diferent environments. In the context.xml file of webapp/META-INF/ folder only have a referent to global environment variable. If i put the values in this file, it will travel with the war file, and it's not the objetive.

In the server, the value of global environments is in server.xml. With the missing "Custom Context" box, i could select one file of my local desktop that contains the values of this global environments variables for my local environment.

Exists another option for same solution?

Thank you.

zengkid commented 4 years ago

@jlparrilla you can create context_local.xml into webapp/META-INF/ folder check sample : https://github.com/zengkid/smart-tomcat-sample/tree/master/web/src/main/webapp/META-INF

jlparrilla commented 4 years ago

Ok! It work prefectly.

Thanks. Have a good day!