<p>My application's context root is /foobar and I am running an exploded deployment with maven-jetty-plugin.</p>

<p>I need to dynamically remap requets for /images/* to /foobar/images/*, and I cannot remap my application's context root to /.</p>

<p>For weblogic I have a halfwit solution where I deploy an additional war containing a proxy to context root /images. </p>

<p>The problem is that I cannot get this to work with maven-jetty-plugin, because I dont see how it can deploy two apps.</p>

<p>Anyone know how to do this  ?</p>

I don't think it can be done since TryUpdateModel, which UpdateModel uses, references the ControllerContext which is null when invoked from a unit test.  I use RhinoMocks to mock or stub the various components needed by the controller.
```
```
var routeData = new RouteData();
var httpContext = MockRepository.GenerateStub<HttpContextBase>();
FormCollection formParameters = new FormCollection();

EventController controller = new EventController();
ControllerContext controllerContext = 
    MockRepository.GenerateStub<ControllerContext>( httpContext,
                                                    routeData,
                                                    controller );
controller.ControllerContext = controllerContext;

ViewResult result = controller.Create( formParameters ) as ViewResult;

Assert.AreEqual( "Event", result.Values["controller"] );
Assert.AreEqual( "Show", result.Values["action"] );
Assert.AreEqual( 0, result.Values["id"] );
```
```
Here's the relevant bit from the Controller.cs source on www.codeplex.com/aspnet:
```
```
protected internal bool TryUpdateModel<TModel>( ... ) where TModel : class
{

     ....

    ModelBindingContext bindingContext =
           new ModelBindingContext( ControllerContext,
                                    valueProvider,
                                    typeof(TModel),
                                    prefix,
                                    () => model,
                                    ModelState,
                                    propertyFilter );

     ...
}
```
```