Off the top of my head I'm not sure whether you can do this or not.
However, it is possible to write a web application so that you don't have to explicitly refer to the context path. If you do need to refer to it then take a look at some of the methods on the HttpServletRequest object.
Also, take a look at the HTML base tag, a nice implementation of which is provided with
Struts.
Sorry that didn't answer your question!
Simon