Java Script <%%> HTML comments add Java output script

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"%><%string path = Request.getcontextpath () ; String basepath = request.getscheme () + "://" + request.getservername () + ":" + request.getserverport () + path + "/";%>& lt;! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

After tomcat processing, the raw Java files
Myjsp_jsp.java

/* * Generated by the Jasper component of Apache Tomcat * Version:apache tomcat/8.5.23 * Generated at:2017-11-20 09:49: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 Myjsp_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.getjspapplicationcon TeXT (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 java.lang.String _jspx_method = Request.getmethod (); if (! " GET ". Equals (_jspx_method) &&!" POST ". Equals (_jspx_method) &&!" HEAD ". Equals (_jspx_method) &&!javax.servlet.dispatchertype.error.equals (Request.getdispatchertype ())) {Response.senderror (httpservletresponse.sc_method_not_allowed, "JSPs only permit GET POST or HEAD");    Return    } final Javax.servlet.jsp.PageContext PageContext;    Javax.servlet.http.HttpSession session = NULL;    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 '); Out.write (' \ 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 ("

Browser view JSP, raw page source code

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

Note: This blog post look good, technology in the continuous development, the content of this blog post ...

Java Script <%%> HTML comments add Java output script

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.