views:

83

answers:

2

what kind of workarounds would you guys suggest if I want to run a spring 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?

+1  A: 

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.

cjstehno
A much better approach is to replace Tomcat with Jetty for development purposes :) You can even debug it perfectly.
mhaller
I would second that as well, and Jetty is also runnable via a maven plugin. I stuck with Tomcat here in case Blankman has a specific need for it.
cjstehno
+2  A: 

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>
Alb