*/
public static String generateBaseUrl () {
// Get external context
- ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
+ final ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
// Get request scheme and such ...
- String scheme = context.getRequestScheme();
- String serverName = context.getRequestServerName();
+ final String scheme = context.getRequestScheme();
+ final String serverName = context.getRequestServerName();
String contextPath = context.getRequestContextPath();
String servletPath = context.getRequestServletPath();
- int port = context.getRequestServerPort();
+ final int port = context.getRequestServerPort();
// Is the path null?
if (null == scheme) {
}
// Init variable
- String baseUrl;
+ final String baseUrl;
// Unusual port found?
if ((port != 80) && (port != 443)) {