001    package jsp.error;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    
007    public final class err_jsp extends org.apache.jasper.runtime.HttpJspBase
008        implements org.apache.jasper.runtime.JspSourceDependent {
009    
010      private static java.util.List _jspx_dependants;
011    
012      static {
013        _jspx_dependants = new java.util.ArrayList(1);
014        _jspx_dependants.add("/error/error.html");
015      }
016    
017      public Object getDependants() {
018        return _jspx_dependants;
019      }
020    
021      public void _jspService(HttpServletRequest request, HttpServletResponse response)
022            throws java.io.IOException, ServletException {
023    
024        JspFactory _jspxFactory = null;
025        PageContext pageContext = null;
026        HttpSession session = null;
027        ServletContext application = null;
028        ServletConfig config = null;
029        JspWriter out = null;
030        Object page = this;
031        JspWriter _jspx_out = null;
032        PageContext _jspx_page_context = null;
033    
034    
035        try {
036          _jspxFactory = JspFactory.getDefaultFactory();
037          response.setContentType("text/html");
038          pageContext = _jspxFactory.getPageContext(this, request, response,
039                            "errorpge.jsp", true, 8192, true);
040          _jspx_page_context = pageContext;
041          application = pageContext.getServletContext();
042          config = pageContext.getServletConfig();
043          session = pageContext.getSession();
044          out = pageContext.getOut();
045          _jspx_out = out;
046    
047          out.write("<html>\n<!--\n Licensed to the Apache Software Foundation (ASF) under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  The ASF licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n<body bgcolor=\"lightblue\">\n\n\t\n\t");
048          error.Smart foo = null;
049          synchronized (request) {
050            foo = (error.Smart) _jspx_page_context.getAttribute("foo", PageContext.REQUEST_SCOPE);
051            if (foo == null){
052              foo = new error.Smart();
053              _jspx_page_context.setAttribute("foo", foo, PageContext.REQUEST_SCOPE);
054            }
055          }
056          out.write('\n');
057          out.write('       ');
058     
059                    String name = null;
060    
061                    if (request.getParameter("name") == null) {
062            
063          out.write('\n');
064          out.write('       ');
065          out.write("<html>\n<!--\n Licensed to the Apache Software Foundation (ASF) under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  The ASF licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n\n<body bgcolor=\"white\">\n\n<h1> This example uses <b>errorpage</b> directive </h1>\n<br>\n<h3> Select my favourite car.</h3>\n<form method=get action=err.jsp>\n<!-- <br> Make a guess: -->\n<SELECT NAME=\"name\" SIZE=5>\n<OPTION VALUE=\"integra\"> Acura Integra <BR>\n");
066          out.write("<OPTION VALUE=\"bmw328i\"> BMW 328I <BR>\n<OPTION VALUE=\"z3\"> BMW Z3 <BR>\n<OPTION VALUE=\"infiniti\"> InfinitiQ3 <BR>\n<OPTION VALUE=\"audi\"> Audi A8 <BR>\n</SELECT>\n<br> <INPUT TYPE=submit name=submit Value=\"Submit\">\n</form>\n\n</body>\n</html>\n");
067          out.write('\n');
068          out.write('       ');
069    
070                    } else {
071                      foo.setName(request.getParameter("name"));
072                      if (foo.getName().equalsIgnoreCase("integra"))
073                            name = "acura";
074                      if (name.equalsIgnoreCase("acura")) {
075            
076          out.write("\n\n\t<H1> Yes!!! <a href=\"http://www.acura.com\">Acura</a> is my favorite car.\n\n\t");
077     
078                      }
079                    }       
080            
081          out.write("\t\n</body>\n</html>\n\n");
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    }