response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n\n<!DOCTYPE html>\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\">\n <title>"); out.print( request.getParameter("pageTitle")); out.write("</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta name=\"description\" content=\"\">\n <meta name=\"author\" content=\"\">\n\n <link href=\"/static/css/bootstrap.min.css\" rel=\"stylesheet\">\n <link href=\"/static/css/bootstrap-theme.min.css\" rel=\"stylesheet\">\n <link href=\"/static/css/hbase.css\" rel=\"stylesheet\">\n </head>\n <body>\n <div class=\"navbar navbar-fixed-top navbar-default\">\n <div class=\"container-fluid\">\n <div class=\"navbar-header\">\n <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\"\n data-target=\".navbar-collapse\">\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n </button>\n <a class=\"navbar-brand\" href=\"/rs-status\">\n <img src=\"/static/hbase_logo_small.png\" alt=\"HBase Logo\"/>\n </a>\n </div>\n <div class=\"collapse navbar-collapse\">\n <ul class=\"nav navbar-nav\">\n <li><a href=\"/rs-status\">Home</a></li>\n"); out.write(" <li><a href=\"/processRS.jsp\">Process Metrics</a></li>\n <li><a href=\"/logs/\">Local Logs</a></li>\n <li><a href=\"/logLevel\">Log Level</a></li>\n <li><a href=\"/dump\">Debug Dump</a></li>\n <li><a href=\"/jmx\">Metrics Dump</a></li>\n "); if (HBaseConfiguration.isShowConfInServlet()) { out.write("\n <li><a href=\"/conf\">HBase Configuration</a></li>\n "); out.write("\n </ul>\n </div><!--/.nav-collapse -->\n </div>\n </div>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); _jspxFactory.releasePageContext(_jspx_page_context);
@Override public void include(String url) throws ServletException, IOException { jspOut.flush(); request.getRequestDispatcher(url).include(request, response); }
@Override public void println(boolean value) throws IOException { getEnclosingWriter().println(value); }
@Override public int doEndTag() throws JspException { EvaluationContext evaluationContext = (EvaluationContext) this.pageContext.getAttribute(EVALUATION_CONTEXT_PAGE_ATTRIBUTE); if (evaluationContext == null) { evaluationContext = createEvaluationContext(this.pageContext); this.pageContext.setAttribute(EVALUATION_CONTEXT_PAGE_ATTRIBUTE, evaluationContext); } if (this.var != null) { Object result = (this.expression != null ? this.expression.getValue(evaluationContext) : null); this.pageContext.setAttribute(this.var, result, this.scope); } else { try { String result = (this.expression != null ? this.expression.getValue(evaluationContext, String.class) : null); result = ObjectUtils.getDisplayString(result); result = htmlEscape(result); result = (this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(result) : result); this.pageContext.getOut().print(result); } catch (IOException ex) { throw new JspException(ex); } } return EVAL_PAGE; }
public int doEndTag() throws JspException { if (bodyContent != null) { try { pageContext.getOut().print(bodyContent.getString()); } catch (IOException ioe) { throw new JspTagException(ioe.toString(), ioe); } } return EVAL_PAGE; }
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); JspWriter out = pageContext.getOut(); out.write(buf.toString()); throw new JspException(ioe.getMessage());
@Override public int doEndTag() throws JspException { try { final ASN1InputStream decoder = new ASN1InputStream(value); ASN1Primitive primitive = decoder.readObject(); while (primitive != null && !(primitive instanceof ASN1Null)) { pageContext.getOut().write(doPrimitive(primitive)); primitive = decoder.readObject(); } } catch (Exception ex) { throw new JspException(ex.getMessage()); } return super.doEndTag(); }
@Override public void doTag() throws IOException { PageContext pageContext = ((PageContext) getJspContext()); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String output = VtorUtil.resolveValidationMessage(request, violation); pageContext.getOut().write(output); }
@Override public void doTag() { PageContext pageContext = (PageContext) getJspContext(); URLCoder.Builder builder = URLCoder.build(baseUrl); for (int i = 0; i < attrs.size(); i += 2) { builder.queryParam(attrs.get(i), attrs.get(i + 1)); } if (var == null) { JspWriter out = pageContext.getOut(); try { out.print(builder.get()); } catch (IOException ioex) { // ignore } } else { pageContext.setAttribute(var, builder.get()); } } }
@Override public int doStartTag() throws JspException { Invocation invocation = InvocationUtils.getCurrentThreadInvocation(); if (invocation != null) { String msg = invocation.getFlash().get(key); if (logger.isDebugEnabled()) { logger.debug("getFlashMessage: " + key + "=" + msg); } if (msg != null) { try { if (StringUtils.isNotEmpty(prefix)) { pageContext.getOut().print(prefix); } pageContext.getOut().print(msg); if (StringUtils.isNotEmpty(suffix)) { pageContext.getOut().print(suffix); } } catch (IOException e) { throw new JspException("", e); } } } return super.doStartTag(); } }
@SuppressWarnings({"unchecked"}) public int onDoStartTag() throws JspException { String strValue = null; if (getSubject() != null) { // Get the principal to print out Object principal; if (type == null) { principal = getSubject().getPrincipal(); } else { principal = getPrincipalFromClassName(); } // Get the string value of the principal if (principal != null) { if (property == null) { strValue = principal.toString(); } else { strValue = getPrincipalProperty(principal, property); } } } // Print out the principal value if not null if (strValue != null) { try { pageContext.getOut().write(strValue); } catch (IOException e) { throw new JspTagException("Error writing [" + strValue + "] to JSP.", e); } } return SKIP_BODY; }
/** * Write the escaped body content to the page. * <p>Can be overridden in subclasses, e.g. for testing purposes. * @param content the content to write * @throws IOException if writing failed */ protected void writeBodyContent(String content) throws IOException { Assert.state(this.bodyContent != null, "No BodyContent set"); this.bodyContent.getEnclosingWriter().print(content); }
/** * Performs smart form population. */ @Override public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); JspWriter out = body.getEnclosingWriter(); String bodytext = populateForm(body.getString(), name -> value(name, pageContext)); try { out.print(bodytext); } catch (IOException ioex) { throw new JspException(ioex); } return SKIP_BODY; }
@Override public void doTag() throws IOException { JspContext jspContext = this.getJspContext(); // generate token HttpServletRequest request = (HttpServletRequest) ((PageContext) jspContext).getRequest(); HttpSession session = request.getSession(); String value = CsrfShield.prepareCsrfToken(session); if (name == null) { name = CsrfShield.CSRF_TOKEN_NAME; } jspContext.getOut().write("<input type=\"hidden\" name=\"" + name + "\" value=\"" + value + "\"/>"); } }
@Override public void write(char[] value, int offset, int length) throws IOException { getEnclosingWriter().write(value, offset, length); }
@Override public void clearBuffer() throws IOException { getEnclosingWriter().clearBuffer(); }
@Override public int doEndTag() throws JspException { String url = createUrl(); RequestDataValueProcessor processor = getRequestContext().getRequestDataValueProcessor(); ServletRequest request = this.pageContext.getRequest(); if ((processor != null) && (request instanceof HttpServletRequest)) { url = processor.processUrl((HttpServletRequest) request, url); } if (this.var == null) { // print the url to the writer try { this.pageContext.getOut().print(url); } catch (IOException ex) { throw new JspException(ex); } } else { // store the url as a variable this.pageContext.setAttribute(this.var, url, this.scope); } return EVAL_PAGE; }
public int doEndTag() throws JspException { try { pageContext.getOut().print(bodyContent.getString()); } catch (IOException ioe) { throw new JspTagException(ioe.toString(), ioe); } return EVAL_PAGE; }