tags:

views:

138

answers:

1

I'm looking to map to a directory on a different host using Jetty/Maven when working locally. I've found you can do this w/ Apache using mod_jk (JkMount/JkUnMount), but haven't figured it how to do the same on jetty.

On our dev/q/live servers, we have Apache in front of JBoss and use mod_jk to do this. Locally, we're using jetty

To give you an idea of what I'm talking about, this is how you would configure Apache to accomplish this:

in httpd.conf:

JkMount /images/* host2

JkMount /* host2

JkUnMount /images/* host1

workers.properties:

worker.list=host2,host1

worker.host2.host=host-2.theDomain.com

worker.host2.port=46654

worker.host1.host=host-1.theDomain.com

worker.host1.port=46655

Is there a way to configure Jetty to do the same thing?

Btw, locally, I'm using the Maven plugin for Eclipse if that makes a difference.

thanks!

A: 

Update:


I tried going a different route here and just added a folder, then Advanced > Link to a folder in the file system and I pointed to a file on the remote server (I believe we use WebDav). The files show up in project explorer, but they aren't served. I'm going to try setting org.mortbay.util.FileResource.checkAliases to true as specified here:

http://docs.codehaus.org/display/JETTY/How+to+enable+serving+aliased+files

...will let you know if that takes care of it.

I tried the solution above by updating the following in webdefault.xml:<servlet> <servlet-name>default</servlet-name> <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class> <init-param> <param-name>aliases</param-name> <param-value>true</param-value> </init-param> ... </servlet> I didn't work though. :(In the meantime, I also found this:http://jiajia.eu/post/2008/10/08/Deploy-multiple-web-apps-with-maven-jetty-plugin.aspxgoing to take a shot at that also. It's a bit different than what I was trying to do so if anyone's tried it...
after looking closer, this isn't a feasible solution since it's looking to point to another war file in a relative dir. ...not cross host.