So I did a little digging, Router.load() actually takes a prefix. It
looks like it is used by the ServletWrapper to set the contextPath
from Servlet configuration.
I may be mistaken, but I do not see any way to cleanly set the
contextPath if you aren't using servlets.
However, I do see a way you could hack it. Since Play's ctxPath
property is public, you could create a PlayPlugin class in a new
module, and set the value of Play.ctxPath when your plugin gets
loaded.
It would look something like this:
public class ContextPathPlugin extends PlayPlugin {
@Override
public void onLoad(){
Play.ctxPath = "/mystring";