URLBuilder urlBuilder = new URLBuilder(null, 0, null, langContext.contenturl(path.getMediaKey(), path.getLayoutKey()), context.getrequest().getQueryString());
if (urlBuilder.hasParameter("$action")) {
urlBuilder.removeParameter("$action");
}
context.redirectto(urlBuilder.rebuild(false));
}
catch (IOException e) {
throw new TMLException("Error redirecting to new language", e, true);
}
catch (WGAPIException e) {