|Running a web app directly from the project directory [message #226045]
||Tue, 06 January 2009 21:11
Originally posted by: emil.caucho.com|
I'm working on the Resin WTP plugin, which is just a basic Generic
server based plugin. We've had a request from a user to run a web
application directly from the WebContent directory as it sits in the
project. Is this possible directly by doing something clever in the
server definition? Ideally, what I'd like is to find the WebContent
directory and pass this in to the server via VM arguments.
Since I couldn't find anything, I started drafting out a publisher to do
the job. I included a configuration file for the server in the plugin
and pull that out to a temp directory, similar to what AntPublisher does
with build files. I then run the server with that configuration file
which is parameterized by VM arguments. Does the premise sound crazy?
The problem that I'm running into with this approach is that I can't
figure out how to pass the VM arguments to the server launcher. I
hacked something up to insert the configuration file location into the
StringVariableManager so that it's resolved as a program argument, but
doing the same thing does not work for VM arguments. Is inserting a
variable into the StringVariableManager a bad idea? Why doesn't the
same approach work for VM arguments?
Finally, where is the WebContent directory path stored? I know that I
can construct a path by doing workspace_loc + project_path +
"/WebContent", but it looks like the actual "WebContent" name can be
specified by the user, so that's not a reliable way to get the path.
Powered by FUDForum
. Page generated in 0.01873 seconds