开发者

Workaround for running tomcat with IntelliJ, maybe a script to push to tomcat?

开发者 https://www.devze.com 2023-01-02 02:19 出处:网络
what kind of workarounds would you guys suggest if I want to run a spr开发者_如何学Going mvc project in intellij (free version) and run it on tomcat?

what kind of workarounds would you guys suggest if I want to run a spr开发者_如何学Going mvc project in intellij (free version) and run it on tomcat?

How about a script to push compiled files to a running instance of tomcat?

how would this work?


Create an ant script that builds the contents of your war to a folder in your project like build/war for example then create a my-app.xml file in conf\Catalina\localhost with contents like this:

<Context path="my-app" reloadable="true" docBase="C:\workspace\[projectname]\build\war" workDir="C:\workspace\[projectname]\work" >
    <Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/>
</Context>


You should look into maven and it's deployment support and/or it's tomcat runtime support. You could also whip up a script using Ant, Groovy, Ruby or some other scripting language to push your files to the deployment directory.

I guess lastly you could use an IDE that does not tie your hands like that, or give in and pay JetBrain$.

Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消