list.jsp revision 43
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncCDDL HEADER START
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncThe contents of this file are subject to the terms of the
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncCommon Development and Distribution License (the "License").
e64031e20c39650a7bc902a3e1aba613b9415deevboxsyncYou may not use this file except in compliance with the License.
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncSee LICENSE.txt included in this distribution for the specific
ca0ee85505c252493a3ee53577848ef8939f991bvboxsynclanguage governing permissions and limitations under the License.
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncWhen distributing Covered Code, include this CDDL HEADER in each
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncfile and include the License file at LICENSE.txt.
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncIf applicable, add the following below this CDDL HEADER, with the
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncfields enclosed by brackets "[]" replaced with your own identifying
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncinformation: Portions Copyright [yyyy] [name of copyright owner]
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncCDDL HEADER END
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncCopyright 2005 Sun Microsystems, Inc. All rights reserved.
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncUse is subject to license terms.
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncident "%Z%%M% %I% %E% SMI"
ca0ee85505c252493a3ee53577848ef8939f991bvboxsync--%><%@ page import = "javax.servlet.*,
468c2bcb36eb9a032f5dd0fcb34db10bd58e9996vboxsyncorg.opensolaris.opengrok.analysis.FileAnalyzer.Genre,
ca0ee85505c252493a3ee53577848ef8939f991bvboxsync%><%@include file="mast.jsp"%><%
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncString rev = null;
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncif(!isDir && ef != null) {
ca0ee85505c252493a3ee53577848ef8939f991bvboxsync } catch (IOException e) {
ca0ee85505c252493a3ee53577848ef8939f991bvboxsyncif (valid) {
ca0ee85505c252493a3ee53577848ef8939f991bvboxsync if (isDir) {
ca0ee85505c252493a3ee53577848ef8939f991bvboxsync// If requesting a Directory listing -------------
DirectoryListing dl = new DirectoryListing(IgnoredNames.ignore, ef);
String[] files = resourceFile.list();
ArrayList readMes = dl.listTo(resourceFile, out, path, files);
if(readMes != null && readMes.size() > 0) {
for(int i = 0; i< readMes.size(); i++) {
BufferedReader br = new BufferedReader(new FileReader(new File(xdir, (String)readMes.get(i))));
%><h3><%=(String)readMes.get(i)%></h3><div id="src"><pre><%
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
response.sendError(404, "Revision not found");
} else if (rev.matches("^[0-9]+(\\.[0-9]+)*$")) {
Class 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) {
System.setProperty("urlPrefix", context+"/s?");
AnalyzerGuru.writeXref(a, in, out);
} 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><%
if(xrefFile.exists()) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
Class 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) {
System.setProperty("urlPrefix", context+"/s?");
AnalyzerGuru.writeXref(a, bin, out);
%><%@include file="foot.jsp"%><%
ef.close();