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 ) ; }
Sends the RSS feed to the client .