THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public void init() {
super.init();
getRootRequestMapperAsCompound().add(
new MountMapper("/mount/point", new PackageMapper(
PackageName.forClass(Page3.class))));
mountPackage("/mount/point", Page3.class);
}
|
Assuming that PageA package is "com.example.pages" a request to "/mount/point/PageB" will use com.example.pages.PageB if it exists and is an instance of Page.
...
Code Block |
---|
public void init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper("/company/logo", new PackageResourceReference(MyPage.class, "res/logo.gif"))); mountSharedResourcemountResource("/company/logo", new PackageResourceReference(MyPage.class, "res/logo.gif"))); // convenient method doing the same as above } |
...