001    package org.apache.hadoop.hdfs.server.datanode;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    import org.apache.hadoop.hdfs.server.common.JspHelper;
007    import org.apache.hadoop.util.ServletUtil;
008    import org.apache.hadoop.conf.Configuration;
009    
010    public final class browseBlock_jsp extends org.apache.jasper.runtime.HttpJspBase
011        implements org.apache.jasper.runtime.JspSourceDependent {
012    
013    
014      //for java.io.Serializable
015      private static final long serialVersionUID = 1L;
016    
017      private static java.util.List _jspx_dependants;
018    
019      public Object getDependants() {
020        return _jspx_dependants;
021      }
022    
023      public void _jspService(HttpServletRequest request, HttpServletResponse response)
024            throws java.io.IOException, ServletException {
025    
026        JspFactory _jspxFactory = null;
027        PageContext pageContext = null;
028        HttpSession session = null;
029        ServletContext application = null;
030        ServletConfig config = null;
031        JspWriter out = null;
032        Object page = this;
033        JspWriter _jspx_out = null;
034        PageContext _jspx_page_context = null;
035    
036    
037        try {
038          _jspxFactory = JspFactory.getDefaultFactory();
039          response.setContentType("text/html; charset=UTF-8");
040          pageContext = _jspxFactory.getPageContext(this, request, response,
041                            null, true, 8192, true);
042          _jspx_page_context = pageContext;
043          application = pageContext.getServletContext();
044          config = pageContext.getServletConfig();
045          session = pageContext.getSession();
046          out = pageContext.getOut();
047          _jspx_out = out;
048    
049    
050    /*
051     * Licensed to the Apache Software Foundation (ASF) under one
052     * or more contributor license agreements.  See the NOTICE file 
053     * distributed with this work for additional information
054     * regarding copyright ownership.  The ASF licenses this file
055     * to you under the Apache License, Version 2.0 (the
056     * "License"); you may not use this file except in compliance
057     * with the License.  You may obtain a copy of the License at
058     *
059     *     http://www.apache.org/licenses/LICENSE-2.0
060     *
061     * Unless required by applicable law or agreed to in writing, software
062     * distributed under the License is distributed on an "AS IS" BASIS,
063     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
064     * See the License for the specific language governing permissions and
065     * limitations under the License.
066     */
067    
068          out.write("<!DOCTYPE html>\n<html>\n<head>\n");
069    JspHelper.createTitle(out, request, request.getParameter("filename")); 
070          out.write("</head>\n<body onload=\"document.goto.dir.focus()\">\n");
071     
072      Configuration conf = 
073         (Configuration) application.getAttribute(JspHelper.CURRENT_CONF);
074      DatanodeJspHelper.generateFileChunks(out, request, conf); 
075    
076          out.write("<hr>\n");
077     DatanodeJspHelper.generateFileDetails(out, request, conf); 
078          out.write("<h2>Local logs</h2>\n<a href=\"/logs/\">Log</a> directory\n\n");
079    
080    out.println(ServletUtil.htmlFooter());
081    
082        } catch (Throwable t) {
083          if (!(t instanceof SkipPageException)){
084            out = _jspx_out;
085            if (out != null && out.getBufferSize() != 0)
086              out.clearBuffer();
087            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
088          }
089        } finally {
090          if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
091        }
092      }
093    }