I joined a project that runs a webapp in place, rather than copying it to Tomcat's webapps subdirectory. It does this by having Ant create a context file in conf/Catalina/localhost once. My problem is that IDEA does not copy this file to the CATALINA_BASE that it makes in its cache, so the webapp doesn't run when I start Tomcat from IDEA. Is there some way I can configure IDEA to work with this project?
One work-around is to manually copy the file to IDEA's cache each time after starting Tomcat. But this is annoying. Any other drawbacks?
Another work-around might be to run Tomcat outside IDEA, connecting with the remote debugger as necessary. What would I loose this way?
A more radical alternative might be to copy the webapp on deployment instead of running in place. But, I think I'd need to put the context file into META-INF/context.xml and change its docBase, so I can't do this as it would affect everyone on the project. They expect to gain a faster development cycle by running in place.
I'm using IDEA 5.0.1 with Tomcat 5.0.28.
Incidentally, the context file is using an XML ENTITY include to keep some sensitive parameters in a separate file. E.g., conf/Catalina/localhost/foo.xml contains: