views:

29

answers:

2

We have a complicated setup via Maven, where different projects are packaged as wars then overlayed on each other.

Today I watched a tutorial of creating a Dynamic Web Project that can run directly within GlassFish. You edit the files press save, and the changes are seen in GlassFish.

Since our setup is complicated, I currently have to run some build scripts to copy files to a locally installed Tomcat. Is there some way to run my source files (that are in several different /src folders) directly on an application server? So that I can edit files and see their change directly in the Application server.

A: 

Set the reloadable attribute of the <Context> element of the webapplication in question to true. See also the Tomcat 6.0 Configuration Reference - The Context Container

reloadable

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

It's however not as blazing fast and efficient as Glassfish does, but it may suffice.

BalusC
I think more of my concern is how I specify that it needs to look in a different folder for dependencies. This project depends heavily on another project. This cross dependency has forced me to once deploy the war (exploded) to Tomcat. Then I have a number of scripts that moves files from these two projects into tomcat/webapps/<context>. Can tomcat be made aware of this?
Drew
Answered my own question, you can add dependencies via JAVA EE Modules. Eclipse will figure out how to do the JAVA side. My problem is adding specific build instructions for all of our Javascript files
Drew
A: 

Due to maven being the glue holding the project together, this was not possible. I am manually deploying a war then writing many scripts to push files in to update files I'm working on.

Drew