rss.jsp revision 0
0N/ASee LICENSE.txt included in this distribution for the specific
0N/Afile and include the License file at LICENSE.txt.
0N/A--%><%@ page import = "javax.servlet.*,
0N/AString context = request.getContextPath();
0N/AString servlet = request.getServletPath();
0N/AString reqURI = request.getRequestURI();
0N/AString path = request.getPathInfo();
0N/AresourcePath = resourceFile.getAbsolutePath();
0N/AString basename = resourceFile.getName();
0N/AString parentBasename = resourceFile.getParentFile().getName();
0N/A|| !resourcePath.startsWith(rawSource)
0N/A|| !resourceFile.canRead()
0N/A response.sendError(404);
0N/A if (File.separatorChar == '\\') {
0N/A path = path.replace('\\','/');
0N/A isDir = resourceFile.isDirectory();
0N/A if (isDir && !reqURI.endsWith("/")) {
0N/A response.sendRedirect(context + servlet + path +"/");
0N/A EftarFileReader ef = new EftarFileReader(getServletContext().getInitParameter("DATA_ROOT") + "/index/dtags.eftar");
0N/A int lastSlash = path.lastIndexOf('/');
0N/A parent = (lastSlash != -1) ? path.substring(0, lastSlash) : "";
0N/A int pLastSlash = parent.lastIndexOf('/');
0N/A parentBasename = pLastSlash != -1 ? parent.substring(pLastSlash+1) : parent;
0N/A<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
0N/A <link><%=request.getRequestURL()%></link>
0N/A String[] apaths = request.getParameterValues("also");
0N/A if (apaths!= null && apaths.length>0) {
0N/A for(int i=0; i< apaths.length; i++) {
0N/A paths.append(' ');
0N/A paths.append(apaths[i]);
0N/A apath = paths.toString();
0N/A hr = new DirectoryHistoryReader(getServletContext().getInitParameter("DATA_ROOT") + "/index", apath, getServletContext().getInitParameter("SRC_ROOT"));
0N/A hr = HistoryGuru.getInstance().getHistoryReader(rawSource + parent, basename);
0N/A String rev = hr.getRevision();
0N/A if(hr.isActive()) {
0N/A ArrayList files = hr.getFiles();
0N/A Iterator ifiles = files.iterator();
0N/A while(ifiles.hasNext()) {
0N/A String ifile = (String)ifiles.next();
0N/A %><%=path%> - <%=hr.getRevision()%><%
0N/A <pubDate><%=hr.getDate()%></pubDate>
0N/A <dc:creator><%=hr.getAuthor()%></dc:creator>