code: public static <E> void forwardToRss(String title, String url, Collection<? extends E> entries, FeedAdapter<E> adapter, StaplerRequest req, HttpServletResponse rsp) throws IOException, ServletException {
          req.setAttribute("adapter",adapter);
          req.setAttribute("title",title);
          req.setAttribute("url",url);
          req.setAttribute("entries",entries);
          req.setAttribute("rootURL", Jenkins.getInstance().getRootUrl());
  
          String flavor = req.getParameter("flavor");
          if(flavor==null)    flavor="atom";
          flavor = flavor.replace('/', '_'); // Don't allow path to any jelly
  
          req.getView(Jenkins.getInstance(),"/hudson/"+flavor+".jelly").forward(req,rsp);
      }
docs: Sends the RSS feed to the client.
  
  @param title
  Title of the feed.
  @param url
  URL of the model object that owns this feed. Relative to the context root.
  @param entries
  Entries to be listed in the RSS feed.
  @param adapter
  Controls how to render entries to RSS.