JSP base Built-in object exception set iserrorpage=true, you can use the

Source: Internet
Author: User
Tags volatile apache tomcat

Li Wu:
Good study and thinking, honouring teachers save Thanksgiving. Leaf See root three return to one, rivers the same oneness.
Meekness conscience lord, willing to do without regrets to the most bitter. Reading exercise strong body and mind, Prudential advised and the line and Cherish.



Javaee:7
javase:1.8
jstl:1.2.2
Server:tomcat 8.5
Browser:chrome/firefox
Os:windows7 x64
Ide:myeclipse

 

myjsp.jsp

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%><%@ page errorpage= " errorpageformyjsp.jsp "%><%string path = Request.getcontextpath (); String BasePath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML public "-//w3c//dtd HTML 4.01 transitional//en" >

errorpageformyjsp.jsp

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%><%@ page iserrorpage= "true"%><% String Path = Request.getcontextpath (); String BasePath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML public "-//w3c//dtd HTML 4.01 transitional//en" >


Browser View myjsp.jsp

After Tomcat processing, The raw Java files

Errorpageformyjsp_jsp.java

/* * Generated by the Jasper component of Apache Tomcat * Version:apache tomcat/8.5.23 * Generated at:2017-12-01 04:30:1       1 UTC * Note:the Last modified time of this file is set to * the last modified time of the source file after * Generation to assist with modification tracking. */package org.apache.jsp;import javax.servlet.*;import Javax.servlet.http.*;import javax.servlet.jsp.*;import Java.util.*;p ublic Final class Errorpageformyjsp_jsp extends Org.apache.jasper.runtime.HttpJspBase implements  org.apache.jasper.runtime.JspSourceDependent, org.apache.jasper.runtime.JspSourceImports {private Static  Final Javax.servlet.jsp.JspFactory _jspxfactory = javax.servlet.jsp.JspFactory.getDefaultFactory ();  private static java.util.map<java.lang.string,java.lang.long> _jspx_dependants;  private static final java.util.set<java.lang.string> _jspx_imports_packages; private static final java.util.set<java.lang.string> _jspx_imports_clasSes    Static {_jspx_imports_packages = new Java.util.hashset<> ();    _jspx_imports_packages.add ("javax.servlet");    _jspx_imports_packages.add ("java.util");    _jspx_imports_packages.add ("javax.servlet.http");    _jspx_imports_packages.add ("javax.servlet.jsp");  _jspx_imports_classes = null;  } Private volatile Javax.el.ExpressionFactory _el_expressionfactory;  Private volatile Org.apache.tomcat.InstanceManager _jsp_instancemanager;  Public java.util.map<java.lang.string,java.lang.long> getdependants () {return _jspx_dependants;  } public java.util.set<java.lang.string> getpackageimports () {return _jspx_imports_packages;  } public java.util.set<java.lang.string> getclassimports () {return _jspx_imports_classes; } public javax.el.ExpressionFactory _jsp_getexpressionfactory () {if (_el_expressionfactory = = Null) {synchroniz ed (this) {if (_el_expressionfactory = = Null) {_el_expressionfactory = _jspxfactory.getjspapplIcationcontext (getservletconfig (). getservletcontext ()). getexpressionfactory ();  }}} return _el_expressionfactory; } public Org.apache.tomcat.InstanceManager _jsp_getinstancemanager () {if (_jsp_instancemanager = = Null) {SYNCHR onized (this) {if (_jsp_instancemanager = = Null) {_jsp_instancemanager = Org.apache.jasper.runtime.Insta        Ncemanagerfactory.getinstancemanager (getservletconfig ());  }}} return _jsp_instancemanager; } public void _jspinit () {} public void _jspdestroy () {} public void _jspservice (final JAVAX.SERVLET.HTTP.HTTPSERVL Etrequest request, final javax.servlet.http.HttpServletResponse Response) throws java.io.IOException, Javax.servlet.s    Ervletexception {final Javax.servlet.jsp.PageContext pagecontext;    Javax.servlet.http.HttpSession session = null;    Java.lang.Throwable exception = Org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable (request); If (exception! = Null) {response.seTstatus (javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR);    } Final Javax.servlet.ServletContext application;    Final Javax.servlet.ServletConfig config;    Javax.servlet.jsp.JspWriter out = null;    Final Java.lang.Object page = this;    Javax.servlet.jsp.JspWriter _jspx_out = null;    Javax.servlet.jsp.PageContext _jspx_page_context = null;      Try {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;      Out.write ("\ r \ n"); Out.write ("\ r \ n"); String Path = Request.getcontextpath ();      String BasePath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";      Out.write ("\ r \ n"); Out.write ("\r\n "); Out.write ("<!      DOCTYPE HTML public \ "-//w3c//dtd HTML 4.01 transitional//en\" >\r\n ");      Out.write ("

Learning resources: itcast and Itheima video library. If you have public resources, can share to me, with your resources to learn also Can.
Blog post is to watch the video, into thinking Written. It's good that the teacher speaks Well. Blog bad, is to give the most bitter not serious.

JSP base Built-in object exception set iserrorpage=true, you can use the

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.