}
private int determineHomepage(javax.servlet.http.HttpServletRequest request, WGPRequestPath path, int iPathType) throws UnsupportedEncodingException, HttpErrorException {
WGDatabase db = (WGDatabase) _core.getContentdbs().get(path.getDatabaseKey());
WGAURLBuilder urlBuilder = _core.retrieveURLBuilder(request, db);
String homepage;
try {
homepage = urlBuilder.buildHomepageURL(db, request);
if (homepage != null) {
path.setResourcePath(homepage);
return WGPRequestPath.TYPE_REDIRECT;
}
}