mast.jsp revision 0
919N/ASee LICENSE.txt included in this distribution for the specific
919N/Afile and include the License file at LICENSE.txt.
919N/A--%><%@ page import = "javax.servlet.*,
0N/AString context = request.getContextPath();
911N/AString servlet = request.getServletPath();
1549N/AString reqURI = request.getRequestURI();
1549N/AString path = request.getPathInfo();
0N/AresourcePath = resourceFile.getAbsolutePath();
0N/AString basename = resourceFile.getName();
0N/AString parentBasename = resourceFile.getParentFile().getName();
970N/A|| IgnoredNames.ignore.contains(basename)
970N/A|| IgnoredNames.ignore.contains(parentBasename)
0N/A|| !resourcePath.startsWith(rawSource)) {
0N/A response.sendError(404);
173N/A if(newFile.canRead()) {
970N/A response.sendRedirect(context + servlet + "/on" + path + "/");
970N/A response.sendRedirect(context + servlet + "/on" + path);
response.sendError(404);
if (File.separatorChar == '\\') {
path = path.replace('\\','/');
isDir = resourceFile.isDirectory();
if (isDir && !servlet.startsWith("/xref") && !servlet.startsWith("/hist")) { //if it is an existing directory perhaps people wanted directory xref
if(!reqURI.endsWith("/")) {
response.sendRedirect(context + "/xref" + path + "/");
response.sendRedirect(context + "/xref" + path);
} if (isDir && !reqURI.endsWith("/")) {
response.sendRedirect(context + servlet + path +"/");
long flast = resourceFile.lastModified();
if (request.getDateHeader("If-Modified-Since") >= flast ) {
response.setDateHeader("Last-Modified", flast);
int lastSlash = path.lastIndexOf('/');
parent = (lastSlash != -1) ? path.substring(0, lastSlash) : "";
int pLastSlash = parent.lastIndexOf('/');
parentBasename = pLastSlash != -1 ? parent.substring(pLastSlash+1) : parent;
noHistory = !(isDir || HistoryGuru.getInstance().hasHistory(rawSource + "/" + parent));
ef = new EftarFileReader(getServletContext().getInitParameter("DATA_ROOT") + "/index/dtags.eftar");
dtag = ef.get(path);
if(servlet.startsWith("/xr")) {
ef.close();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="alternate stylesheet" type="text/css" media="all" title="Paper White" href="<%=context%>/print.css"/>
<div id="Masthead"><tt><a href="<%=context%>/xref/">xref</a>: <%=org.opensolaris.opengrok.web.Util.breadcrumbPath(context + "/xref", path)%><%= isDir ? "/" : "" %></tt></div>
if ((!isDir && noHistory) || servlet.startsWith("/hi")) {
if(path.length() > 0) {