1 | package org.apache.jsp; |
---|
2 | |
---|
3 | import javax.servlet.*; |
---|
4 | import javax.servlet.http.*; |
---|
5 | import javax.servlet.jsp.*; |
---|
6 | |
---|
7 | public final class _401_jsp extends org.apache.jasper.runtime.HttpJspBase |
---|
8 | implements org.apache.jasper.runtime.JspSourceDependent { |
---|
9 | |
---|
10 | private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); |
---|
11 | |
---|
12 | private static java.util.List _jspx_dependants; |
---|
13 | |
---|
14 | private javax.el.ExpressionFactory _el_expressionfactory; |
---|
15 | private org.apache.AnnotationProcessor _jsp_annotationprocessor; |
---|
16 | |
---|
17 | public Object getDependants() { |
---|
18 | return _jspx_dependants; |
---|
19 | } |
---|
20 | |
---|
21 | public void _jspInit() { |
---|
22 | _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); |
---|
23 | _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName()); |
---|
24 | } |
---|
25 | |
---|
26 | public void _jspDestroy() { |
---|
27 | } |
---|
28 | |
---|
29 | public void _jspService(HttpServletRequest request, HttpServletResponse response) |
---|
30 | throws java.io.IOException, ServletException { |
---|
31 | |
---|
32 | PageContext pageContext = null; |
---|
33 | HttpSession session = null; |
---|
34 | ServletContext application = null; |
---|
35 | ServletConfig config = null; |
---|
36 | JspWriter out = null; |
---|
37 | Object page = this; |
---|
38 | JspWriter _jspx_out = null; |
---|
39 | PageContext _jspx_page_context = null; |
---|
40 | |
---|
41 | |
---|
42 | try { |
---|
43 | response.setContentType("text/html"); |
---|
44 | pageContext = _jspxFactory.getPageContext(this, request, response, |
---|
45 | null, true, 8192, true); |
---|
46 | _jspx_page_context = pageContext; |
---|
47 | application = pageContext.getServletContext(); |
---|
48 | config = pageContext.getServletConfig(); |
---|
49 | session = pageContext.getSession(); |
---|
50 | out = pageContext.getOut(); |
---|
51 | _jspx_out = out; |
---|
52 | |
---|
53 | out.write("<!--\n"); |
---|
54 | out.write(" Licensed to the Apache Software Foundation (ASF) under one or more\n"); |
---|
55 | out.write(" contributor license agreements. See the NOTICE file distributed with\n"); |
---|
56 | out.write(" this work for additional information regarding copyright ownership.\n"); |
---|
57 | out.write(" The ASF licenses this file to You under the Apache License, Version 2.0\n"); |
---|
58 | out.write(" (the \"License\"); you may not use this file except in compliance with\n"); |
---|
59 | out.write(" the License. You may obtain a copy of the License at\n"); |
---|
60 | out.write("\n"); |
---|
61 | out.write(" http://www.apache.org/licenses/LICENSE-2.0\n"); |
---|
62 | out.write("\n"); |
---|
63 | out.write(" Unless required by applicable law or agreed to in writing, software\n"); |
---|
64 | out.write(" distributed under the License is distributed on an \"AS IS\" BASIS,\n"); |
---|
65 | out.write(" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"); |
---|
66 | out.write(" See the License for the specific language governing permissions and\n"); |
---|
67 | out.write(" limitations under the License.\n"); |
---|
68 | out.write("-->\n"); |
---|
69 | |
---|
70 | response.setHeader("WWW-Authenticate", "Basic realm=\"Tomcat Manager Application\""); |
---|
71 | |
---|
72 | out.write("\n"); |
---|
73 | out.write("<html>\n"); |
---|
74 | out.write(" <head>\n"); |
---|
75 | out.write(" <title>401 Unauthorized</title>\n"); |
---|
76 | out.write(" <style>\n"); |
---|
77 | out.write(" <!--\n"); |
---|
78 | out.write(" BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}\n"); |
---|
79 | out.write(" H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}\n"); |
---|
80 | out.write(" PRE, TT {border: 1px dotted #525D76}\n"); |
---|
81 | out.write(" A {color : black;}A.name {color : black;}\n"); |
---|
82 | out.write(" -->\n"); |
---|
83 | out.write(" </style>\n"); |
---|
84 | out.write(" </head>\n"); |
---|
85 | out.write(" <body>\n"); |
---|
86 | out.write(" <h1>401 Unauthorized</h1>\n"); |
---|
87 | out.write(" <p>\n"); |
---|
88 | out.write(" You are not authorized to view this page. If you have not changed\n"); |
---|
89 | out.write(" any configuration files, please examine the file\n"); |
---|
90 | out.write(" <tt>conf/tomcat-users.xml</tt> in your installation. That\n"); |
---|
91 | out.write(" file will contain the credentials to let you use this webapp.\n"); |
---|
92 | out.write(" </p>\n"); |
---|
93 | out.write(" <p>\n"); |
---|
94 | out.write(" You will need to add <tt>manager</tt> role to the config file listed above.\n"); |
---|
95 | out.write(" For example:\n"); |
---|
96 | out.write("<pre>\n"); |
---|
97 | out.write("<role rolename=\"manager\"/>\n"); |
---|
98 | out.write("<user username=\"tomcat\" password=\"s3cret\" roles=\"manager\"/>\n"); |
---|
99 | out.write("</pre>\n"); |
---|
100 | out.write(" </p>\n"); |
---|
101 | out.write(" <p>\n"); |
---|
102 | out.write(" For more information - please see the\n"); |
---|
103 | out.write(" <a href=\"/docs/manager-howto.html\">Manager App HOW-TO</a>.\n"); |
---|
104 | out.write(" </p>\n"); |
---|
105 | out.write(" </body>\n"); |
---|
106 | out.write("\n"); |
---|
107 | out.write("</html>\n"); |
---|
108 | } catch (Throwable t) { |
---|
109 | if (!(t instanceof SkipPageException)){ |
---|
110 | out = _jspx_out; |
---|
111 | if (out != null && out.getBufferSize() != 0) |
---|
112 | try { out.clearBuffer(); } catch (java.io.IOException e) {} |
---|
113 | if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); |
---|
114 | } |
---|
115 | } finally { |
---|
116 | _jspxFactory.releasePageContext(_jspx_page_context); |
---|
117 | } |
---|
118 | } |
---|
119 | } |
---|