list.jsp revision 02508b90a0eace220eabd5ec85ff37e9009c6b16
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenCDDL HEADER START
d99107ddf4d9bccb710994482daf65276a9d6321Timo SirainenThe contents of this file are subject to the terms of the
d99107ddf4d9bccb710994482daf65276a9d6321Timo SirainenCommon Development and Distribution License (the "License").
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenYou may not use this file except in compliance with the License.
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenSee LICENSE.txt included in this distribution for the specific
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainenlanguage governing permissions and limitations under the License.
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo SirainenWhen distributing Covered Code, include this CDDL HEADER in each
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenfile and include the License file at LICENSE.txt.
bbe42963032af89fac1318844da08c742525cc87Timo SirainenIf applicable, add the following below this CDDL HEADER, with the
72b9d8039b714ea57c4e3b31bce32ef41cb414d4Timo Sirainenfields enclosed by brackets "[]" replaced with your own identifying
1299f2c3723ca9ccf8f9e563ec23ee1a1721fe4cTimo Siraineninformation: Portions Copyright [yyyy] [name of copyright owner]
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo SirainenCDDL HEADER END
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo SirainenCopyright 2009 Sun Microsystems, Inc. All rights reserved.
bbe42963032af89fac1318844da08c742525cc87Timo SirainenUse is subject to license terms.
53f37d41e1abb068131320f39f870fc92e81f560Timo Sirainen--%><%@ page import = "javax.servlet.*,
java.io.*,
this.innerHTML='';
ef.close();
Project activeProject = Project.getProject(resourceFile);
//TODO: somehow integrate below with projects.jspf
Cookie[] cookies = request.getCookies();
for (String proj : cookie.getValue().split(",")) {
if (Project.getByDescription(proj) != null) {
project.add(proj);
// set this in case there is no project selected or current cookie doesn't contain current project from the link, so the rest of search works 100% :)
StringBuffer sproject=new StringBuffer(activeProject.getDescription()+",");
cookie.setPath(context + "/");
response.addCookie(cookie);
String[] files = resourceFile.list();
List<String> readMes = dl.listTo(resourceFile, out, path, files);
if(readMes != null && readMes.size() > 0) {
File xdir = new File(environment.getDataRootPath() + "/xref" + path);
if (readmeFile.exists()) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
response.sendError(404, "Revision not found");
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
response.sendError(404, "Revision not found");
a = AnalyzerGuru.find(in);
g = AnalyzerGuru.getGenre(a);
%><div id="src">Binary file [Click <a href="<%=context%>/raw<%=path%>?r=<%=rev%>">here</a> to download] </div><%
if (g == Genre.PLAIN) {
Annotation annotation = annotate ? HistoryGuru.getInstance().annotate(resourceFile, rev) : null;
//annotation.writeTooltipMap(out); //not needed yet
} else if (g == Genre.IMAGE) {
} else if (g == Genre.HTML) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
%> <h3 class="error">IO Error</h3> <p> <%=e.getMessage() %> </p> <%
in.close();
} else if(g == Genre.IMAGE) {
%><div id="src"> Binary file [Click <a href="<%=context%>/raw<%=path%>?r=<%=rev%>">here</a> to download] </div><%
File xrefSource = new File(environment.getDataRootFile(), "/xref");
if (environment.isCompressXref() ) {
if (xrefFile.exists()) {
if (xrefFile.exists()) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
a = AnalyzerGuru.find(bin);
g = AnalyzerGuru.getGenre(a);
if (g == Genre.IMAGE) {
} else if( g == Genre.HTML) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
} else if(g == Genre.PLAIN) {
Annotation annotation = annotate ? HistoryGuru.getInstance().annotate(resourceFile, rev) : null;
%><%@include file="foot.jspf"%><%
ef.close();