String baseUrl = servletContext.getInitParameter("baseUrl");
if (baseUrl == null) {
urlFactory = FeedURLFactory.getDefault();
} else {
try {
urlFactory = new FeedURLFactory(baseUrl);
} catch (MalformedURLException e) {
RuntimeException re =
new RuntimeException("Cannot use the baseUrl context parameter", e);
servletContext.log(re.getMessage(), re.getCause());
throw re;