String context = PropertiesManager.getProperty("app.context"); if(context == null) { context = ""; } item.setLink(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/" + context + "/publico/viewSite.do?method=announcements&objectCode=" + executionCourse.getSite().getIdInternal() + "&executionPeriodOID=" + executionCourse.getExecutionPeriod().getIdInternal() + "#" + announcement.getIdInternal()));
String appContext = PropertiesManager.getProperty("app.context"); String context = (appContext != null && appContext.length() > 0) ? "/" + appContext : ""; item.setLink(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), context + "/publico/viewSite.do?method=announcements&objectCode=" + executionCourse.getSite().getIdInternal() + "&executionPeriodOID=" + executionCourse.getExecutionPeriod().getIdInternal() + "#" + announcement.getIdInternal()));
	protected ChannelIF getRSSChannel(HttpServletRequest request) throws Exception {		String id = request.getParameter("id");		Object[] args = {ExecutionCourse.class, Integer.valueOf(id)};		ExecutionCourse executionCourse = executionCourse = (ExecutionCourse) ServiceManagerServiceFactory.executeService(null, "ReadDomainObject", args);		ChannelBuilder builder = new ChannelBuilder();    	ChannelIF channel = builder.createChannel(executionCourse.getNome());    	channel.setDescription("Anncios da disciplina " + executionCourse.getNome());    	for (Announcement announcement : executionCourse.getSite().getAssociatedAnnouncements()) {			ItemIF item = new Item();			item.setTitle(announcement.getTitle());			item.setDate(announcement.getLastModifiedDate());			item.setDescription(announcement.getInformation());			String context = PropertiesManager.getProperty("app.context");			if(context == null) {				context = "";			}			item.setLink(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/" + context + "/publico/viewSite.do?method=announcements&objectCode=" + executionCourse.getSite().getIdInternal() + "&executionPeriodOID=" + executionCourse.getExecutionPeriod().getIdInternal() + "#" + announcement.getIdInternal()));			channel.addItem(item);		}    	return channel;	}